diff --git a/toolchain/check/call.cpp b/toolchain/check/call.cpp index 9b8e82572f15..2146045d5548 100644 --- a/toolchain/check/call.cpp +++ b/toolchain/check/call.cpp @@ -263,11 +263,13 @@ auto PerformCallToFunction(Context& context, SemIR::LocId loc_id, switch (callee.special_function_kind) { case SemIR::Function::SpecialFunctionKind::Thunk: { // If we're about to form a direct call to a thunk, inline it. - LoadImportRef(context, callee.thunk_decl_id()); + auto callee_inst_id = + context.sem_ir().thunks().Get(callee.thunk_id()).callee_id; + LoadImportRef(context, callee_inst_id); // Name the thunk target within the enclosing scope of the thunk. auto thunk_ref_id = - BuildNameRef(context, loc_id, callee.name_id, callee.thunk_decl_id(), + BuildNameRef(context, loc_id, callee.name_id, callee_inst_id, callee_function.enclosing_specific_id); auto param_pattern_ids = diff --git a/toolchain/check/import_ref.cpp b/toolchain/check/import_ref.cpp index 0fbbb0f5845a..c9d13dfaf4ab 100644 --- a/toolchain/check/import_ref.cpp +++ b/toolchain/check/import_ref.cpp @@ -158,6 +158,9 @@ class ImportContext { // Returns the file we are importing from. auto import_ir() -> const SemIR::File& { return import_ir_; } + auto import_thunks() -> const SemIR::ThunkStore& { + return import_ir().thunks(); + } // Accessors into value stores of the file we are importing from. auto import_associated_constants() -> const SemIR::AssociatedConstantStore& { @@ -2323,6 +2326,25 @@ static auto TryResolveTypedInst(ImportRefResolver& resolver, GetLocalConstantInstId(resolver, import_function.self_param_id); auto return_pattern_id = GetLocalConstantInstId(resolver, import_function.return_pattern_id); + + const SemIR::ThunkInfo* import_thunk_info = nullptr; + if (import_function.special_function_kind == + SemIR::Function::SpecialFunctionKind::Thunk && + import_function.thunk_id().has_value()) { + import_thunk_info = + &resolver.import_thunks().Get(import_function.thunk_id()); + } + auto thunk_signature_inst_id = + import_thunk_info + ? GetLocalConstantInstId(resolver, + resolver.import_functions() + .Get(import_thunk_info->signature_id) + .first_decl_id()) + : SemIR::InstId::None; + auto thunk_specific_data = GetLocalSpecificData( + resolver, import_thunk_info ? import_thunk_info->specific_id + : SemIR::SpecificId::None); + auto& new_function = resolver.local_functions().Get(function_id); if (resolver.HasNewWork()) { return ResolveResult::Retry(function_const_id, @@ -2369,11 +2391,23 @@ static auto TryResolveTypedInst(ImportRefResolver& resolver, break; } case SemIR::Function::SpecialFunctionKind::Thunk: { + auto thunk_signature_type_id = + resolver.local_insts().Get(thunk_signature_inst_id).type_id(); auto entity_name_id = resolver.local_entity_names().AddCanonical( {.name_id = new_function.name_id, .parent_scope_id = new_function.parent_scope_id}); - new_function.SetThunk(AddImportRef( - resolver, import_function.thunk_decl_id(), entity_name_id)); + SemIR::ThunkInfo local_thunk_info = { + .callee_id = AddImportRef(resolver, import_thunk_info->callee_id, + entity_name_id), + .signature_id = + resolver.local_types() + .GetAs(thunk_signature_type_id) + .function_id}; + if (import_thunk_info->specific_id.has_value()) { + local_thunk_info.specific_id = GetOrAddLocalSpecific( + resolver, import_thunk_info->specific_id, thunk_specific_data); + } + new_function.SetThunk(resolver.local_ir().thunks().Add(local_thunk_info)); break; } case SemIR::Function::SpecialFunctionKind::HasCppThunk: { @@ -2487,7 +2521,7 @@ static auto TryResolveTypedInst(ImportRefResolver& resolver, resolver.import_functions().Get(inst.function_id).first_decl_id()); auto specific_data = GetLocalSpecificData(resolver, inst.specific_id); - if (resolver.HasNewWork()) { + if (resolver.HasNewWork() || !fn_val_id.has_value()) { return ResolveResult::Retry(); } auto fn_type_id = resolver.local_insts().Get(fn_val_id).type_id(); @@ -4116,11 +4150,9 @@ static auto TryResolveInstCanonical(ImportRefResolver& resolver, CARBON_CHECK(!const_id.has_value()); auto inst_constant_id = resolver.import_constant_values().Get(inst_id); - if (!inst_constant_id.is_constant()) { + if (!inst_constant_id.has_value() || !inst_constant_id.is_constant()) { // TODO: Import of non-constant BindNames happens when importing `let` // declarations. - CARBON_CHECK(resolver.import_insts().Is(inst_id), - "TryResolveInst on non-constant instruction {0}", inst_id); return ResolveResult::Done(SemIR::ConstantId::NotConstant); } diff --git a/toolchain/check/testdata/for/actual.carbon b/toolchain/check/testdata/for/actual.carbon index 3cad68f56a00..8698a505d5f0 100644 --- a/toolchain/check/testdata/for/actual.carbon +++ b/toolchain/check/testdata/for/actual.carbon @@ -150,9 +150,9 @@ fn Read(y:! Core.IntLiteral()) { // CHECK:STDOUT: %Int.as.OrderedWith.impl.Less.type.da0: type = fn_type @Int.as.OrderedWith.impl.Less.1, @Int.as.OrderedWith.impl.b74(%N, %N) [symbolic] // CHECK:STDOUT: %Int.as.OrderedWith.impl.Less.2b7: %Int.as.OrderedWith.impl.Less.type.da0 = struct_value () [symbolic] // CHECK:STDOUT: %.851: require_specific_def_type = require_specific_def @Int.as.OrderedWith.impl.b74(%N, %N) [symbolic] -// CHECK:STDOUT: %OrderedWith.facet: %OrderedWith.type.e44 = facet_value %Int.fc6021.1, (%OrderedWith.impl_witness.e5b) [symbolic] -// CHECK:STDOUT: %OrderedWith.WithSelf.Less.type.b0e: type = fn_type @OrderedWith.WithSelf.Less, @OrderedWith.WithSelf(%Int.fc6021.1, %OrderedWith.facet) [symbolic] -// CHECK:STDOUT: %.a4b: type = fn_type_with_self_type %OrderedWith.WithSelf.Less.type.b0e, %OrderedWith.facet [symbolic] +// CHECK:STDOUT: %OrderedWith.facet.76c: %OrderedWith.type.e44 = facet_value %Int.fc6021.1, (%OrderedWith.impl_witness.e5b) [symbolic] +// CHECK:STDOUT: %OrderedWith.WithSelf.Less.type.b0e: type = fn_type @OrderedWith.WithSelf.Less, @OrderedWith.WithSelf(%Int.fc6021.1, %OrderedWith.facet.76c) [symbolic] +// CHECK:STDOUT: %.a4b: type = fn_type_with_self_type %OrderedWith.WithSelf.Less.type.b0e, %OrderedWith.facet.76c [symbolic] // CHECK:STDOUT: %Int.as.OrderedWith.impl.Less.specific_fn.5fb: = specific_function %Int.as.OrderedWith.impl.Less.2b7, @Int.as.OrderedWith.impl.Less.1(%N, %N) [symbolic] // CHECK:STDOUT: %Inc.type: type = facet_type <@Inc> [concrete] // CHECK:STDOUT: %Inc.lookup_impl_witness: = lookup_impl_witness %Int.fc6021.1, @Inc [symbolic] @@ -594,7 +594,7 @@ fn Read(y:! Core.IntLiteral()) { // CHECK:STDOUT: %assoc0: @IntRange.as.Iterate.impl.Next.%OrderedWith.assoc_type (%OrderedWith.assoc_type.215) = assoc_entity element0, imports.%Core.import_ref.255 [symbolic = %assoc0 (constants.%assoc0.15c)] // CHECK:STDOUT: %.loc13_17.2: require_specific_def_type = require_specific_def @Int.as.OrderedWith.impl.b74(%N, %N) [symbolic = %.loc13_17.2 (constants.%.851)] // CHECK:STDOUT: %OrderedWith.impl_witness: = impl_witness imports.%OrderedWith.impl_witness_table.324, @Int.as.OrderedWith.impl.b74(%N, %N) [symbolic = %OrderedWith.impl_witness (constants.%OrderedWith.impl_witness.e5b)] -// CHECK:STDOUT: %OrderedWith.facet: @IntRange.as.Iterate.impl.Next.%OrderedWith.type.loc13_17.2 (%OrderedWith.type.e44) = facet_value %Int.loc11_43.1, (%OrderedWith.impl_witness) [symbolic = %OrderedWith.facet (constants.%OrderedWith.facet)] +// CHECK:STDOUT: %OrderedWith.facet: @IntRange.as.Iterate.impl.Next.%OrderedWith.type.loc13_17.2 (%OrderedWith.type.e44) = facet_value %Int.loc11_43.1, (%OrderedWith.impl_witness) [symbolic = %OrderedWith.facet (constants.%OrderedWith.facet.76c)] // CHECK:STDOUT: %OrderedWith.WithSelf.Less.type: type = fn_type @OrderedWith.WithSelf.Less, @OrderedWith.WithSelf(%Int.loc11_43.1, %OrderedWith.facet) [symbolic = %OrderedWith.WithSelf.Less.type (constants.%OrderedWith.WithSelf.Less.type.b0e)] // CHECK:STDOUT: %.loc13_17.3: type = fn_type_with_self_type %OrderedWith.WithSelf.Less.type, %OrderedWith.facet [symbolic = %.loc13_17.3 (constants.%.a4b)] // CHECK:STDOUT: %Int.as.OrderedWith.impl.Less.type: type = fn_type @Int.as.OrderedWith.impl.Less.1, @Int.as.OrderedWith.impl.b74(%N, %N) [symbolic = %Int.as.OrderedWith.impl.Less.type (constants.%Int.as.OrderedWith.impl.Less.type.da0)] diff --git a/toolchain/check/testdata/impl/fail_call_invalid.carbon b/toolchain/check/testdata/impl/fail_call_invalid.carbon index 792cb99d6659..b494efd16855 100644 --- a/toolchain/check/testdata/impl/fail_call_invalid.carbon +++ b/toolchain/check/testdata/impl/fail_call_invalid.carbon @@ -152,7 +152,7 @@ fn InstanceCall(n: i32) { // CHECK:STDOUT: // CHECK:STDOUT: fn @i32.as.Simple.impl.G.loc24_27.1(%self.param: ); // CHECK:STDOUT: -// CHECK:STDOUT: fn @i32.as.Simple.impl.G.loc24_27.2(%self.param: %i32) [thunk @i32.as.Simple.impl.%i32.as.Simple.impl.G.decl.loc24_27.1] { +// CHECK:STDOUT: fn @i32.as.Simple.impl.G.loc24_27.2(%self.param: %i32) [thunk @i32.as.Simple.impl.%i32.as.Simple.impl.G.decl.loc24_27.1 for @Simple.WithSelf.%Simple.WithSelf.G.decl, @Simple.WithSelf.G(constants.%Simple.facet)] { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %G.ref: %i32.as.Simple.impl.G.type.32ad7a.1 = name_ref G, @i32.as.Simple.impl.%i32.as.Simple.impl.G.decl.loc24_27.1 [concrete = constants.%i32.as.Simple.impl.G.4f6260.1] // CHECK:STDOUT: %i32.as.Simple.impl.G.bound: = bound_method %self.param, %G.ref diff --git a/toolchain/check/testdata/impl/fail_impl_bad_assoc_fn.carbon b/toolchain/check/testdata/impl/fail_impl_bad_assoc_fn.carbon index 46175ee08358..43fedd3c57ce 100644 --- a/toolchain/check/testdata/impl/fail_impl_bad_assoc_fn.carbon +++ b/toolchain/check/testdata/impl/fail_impl_bad_assoc_fn.carbon @@ -1208,7 +1208,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: // CHECK:STDOUT: fn @FExtraParam.as.I.impl.F.loc69_18.1(%b.param: bool); // CHECK:STDOUT: -// CHECK:STDOUT: fn @FExtraParam.as.I.impl.F.loc69_18.2() [thunk @FExtraParam.as.I.impl.%FExtraParam.as.I.impl.F.decl.loc69_18.1] { +// CHECK:STDOUT: fn @FExtraParam.as.I.impl.F.loc69_18.2() [thunk @FExtraParam.as.I.impl.%FExtraParam.as.I.impl.F.decl.loc69_18.1 for @I.WithSelf.%I.WithSelf.F.decl, @I.WithSelf.F(constants.%I.facet.b53)] { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %FExtraParam.as.I.impl.F.type.531438.1 = name_ref F, @FExtraParam.as.I.impl.%FExtraParam.as.I.impl.F.decl.loc69_18.1 [concrete = constants.%FExtraParam.as.I.impl.F.33e1fe.1] // CHECK:STDOUT: return @@ -1216,7 +1216,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: // CHECK:STDOUT: fn @FExtraImplicitParam.as.I.impl.F.loc85_23.1(%self.param: %FExtraImplicitParam); // CHECK:STDOUT: -// CHECK:STDOUT: fn @FExtraImplicitParam.as.I.impl.F.loc85_23.2() [thunk @FExtraImplicitParam.as.I.impl.%FExtraImplicitParam.as.I.impl.F.decl.loc85_23.1] { +// CHECK:STDOUT: fn @FExtraImplicitParam.as.I.impl.F.loc85_23.2() [thunk @FExtraImplicitParam.as.I.impl.%FExtraImplicitParam.as.I.impl.F.decl.loc85_23.1 for @I.WithSelf.%I.WithSelf.F.decl, @I.WithSelf.F(constants.%I.facet.5a5)] { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %FExtraImplicitParam.as.I.impl.F.type.9dd145.1 = name_ref F, @FExtraImplicitParam.as.I.impl.%FExtraImplicitParam.as.I.impl.F.decl.loc85_23.1 [concrete = constants.%FExtraImplicitParam.as.I.impl.F.99eae8.1] // CHECK:STDOUT: %FExtraImplicitParam.as.I.impl.F.call: init %empty_tuple.type = call %F.ref() @@ -1231,7 +1231,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: // CHECK:STDOUT: fn @FMissingParam.as.J.impl.F.loc117_31.1(%self.param: bool) -> out %return.param: bool; // CHECK:STDOUT: -// CHECK:STDOUT: fn @FMissingParam.as.J.impl.F.loc117_31.2(%self.param: bool, %b.param: bool) -> out %return.param: bool [thunk @FMissingParam.as.J.impl.%FMissingParam.as.J.impl.F.decl.loc117_31.1] { +// CHECK:STDOUT: fn @FMissingParam.as.J.impl.F.loc117_31.2(%self.param: bool, %b.param: bool) -> out %return.param: bool [thunk @FMissingParam.as.J.impl.%FMissingParam.as.J.impl.F.decl.loc117_31.1 for @J.WithSelf.%J.WithSelf.F.decl, @J.WithSelf.F(constants.%J.facet.567)] { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %FMissingParam.as.J.impl.F.type.0f71d8.1 = name_ref F, @FMissingParam.as.J.impl.%FMissingParam.as.J.impl.F.decl.loc117_31.1 [concrete = constants.%FMissingParam.as.J.impl.F.7540f6.1] // CHECK:STDOUT: %FMissingParam.as.J.impl.F.bound: = bound_method %self.param, %F.ref @@ -1240,7 +1240,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: // CHECK:STDOUT: fn @FMissingImplicitParam.as.J.impl.F.loc130_26.1(%b.param: bool) -> out %return.param: bool; // CHECK:STDOUT: -// CHECK:STDOUT: fn @FMissingImplicitParam.as.J.impl.F.loc130_26.2(%self.param: bool, %b.param: bool) -> out %return.param: bool [thunk @FMissingImplicitParam.as.J.impl.%FMissingImplicitParam.as.J.impl.F.decl.loc130_26.1] { +// CHECK:STDOUT: fn @FMissingImplicitParam.as.J.impl.F.loc130_26.2(%self.param: bool, %b.param: bool) -> out %return.param: bool [thunk @FMissingImplicitParam.as.J.impl.%FMissingImplicitParam.as.J.impl.F.decl.loc130_26.1 for @J.WithSelf.%J.WithSelf.F.decl, @J.WithSelf.F(constants.%J.facet.266)] { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %FMissingImplicitParam.as.J.impl.F.type.80a56b.1 = name_ref F, @FMissingImplicitParam.as.J.impl.%FMissingImplicitParam.as.J.impl.F.decl.loc130_26.1 [concrete = constants.%FMissingImplicitParam.as.J.impl.F.c6a0b7.1] // CHECK:STDOUT: %FMissingImplicitParam.as.J.impl.F.call: init bool = call %F.ref(%b.param) @@ -1249,7 +1249,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: // CHECK:STDOUT: fn @FMissingReturnType.as.J.impl.F.loc152_30.1(%self.param: bool, %b.param: bool); // CHECK:STDOUT: -// CHECK:STDOUT: fn @FMissingReturnType.as.J.impl.F.loc152_30.2(%self.param: bool, %b.param: bool) -> out %return.param: bool [thunk @FMissingReturnType.as.J.impl.%FMissingReturnType.as.J.impl.F.decl.loc152_30.1] { +// CHECK:STDOUT: fn @FMissingReturnType.as.J.impl.F.loc152_30.2(%self.param: bool, %b.param: bool) -> out %return.param: bool [thunk @FMissingReturnType.as.J.impl.%FMissingReturnType.as.J.impl.F.decl.loc152_30.1 for @J.WithSelf.%J.WithSelf.F.decl, @J.WithSelf.F(constants.%J.facet.a9e)] { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %FMissingReturnType.as.J.impl.F.type.ce0d21.1 = name_ref F, @FMissingReturnType.as.J.impl.%FMissingReturnType.as.J.impl.F.decl.loc152_30.1 [concrete = constants.%FMissingReturnType.as.J.impl.F.5b613a.1] // CHECK:STDOUT: %FMissingReturnType.as.J.impl.F.bound: = bound_method %self.param, %F.ref @@ -1260,7 +1260,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: // CHECK:STDOUT: fn @FDifferentParamType.as.J.impl.F.loc171_38.1(%self.param: bool, %b.param: %FDifferentParamType) -> out %return.param: bool; // CHECK:STDOUT: -// CHECK:STDOUT: fn @FDifferentParamType.as.J.impl.F.loc171_38.2(%self.param: bool, %b.param: bool) -> out %return.param: bool [thunk @FDifferentParamType.as.J.impl.%FDifferentParamType.as.J.impl.F.decl.loc171_38.1] { +// CHECK:STDOUT: fn @FDifferentParamType.as.J.impl.F.loc171_38.2(%self.param: bool, %b.param: bool) -> out %return.param: bool [thunk @FDifferentParamType.as.J.impl.%FDifferentParamType.as.J.impl.F.decl.loc171_38.1 for @J.WithSelf.%J.WithSelf.F.decl, @J.WithSelf.F(constants.%J.facet.bd2)] { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %FDifferentParamType.as.J.impl.F.type.10926d.1 = name_ref F, @FDifferentParamType.as.J.impl.%FDifferentParamType.as.J.impl.F.decl.loc171_38.1 [concrete = constants.%FDifferentParamType.as.J.impl.F.f1245a.1] // CHECK:STDOUT: %FDifferentParamType.as.J.impl.F.bound: = bound_method %self.param, %F.ref @@ -1271,7 +1271,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: // CHECK:STDOUT: fn @FDifferentImplicitParamType.as.J.impl.F.loc184_38.1(%self.param: %FDifferentImplicitParamType, %b.param: bool) -> out %return.param: bool; // CHECK:STDOUT: -// CHECK:STDOUT: fn @FDifferentImplicitParamType.as.J.impl.F.loc184_38.2(%self.param: bool, %b.param: bool) -> out %return.param: bool [thunk @FDifferentImplicitParamType.as.J.impl.%FDifferentImplicitParamType.as.J.impl.F.decl.loc184_38.1] { +// CHECK:STDOUT: fn @FDifferentImplicitParamType.as.J.impl.F.loc184_38.2(%self.param: bool, %b.param: bool) -> out %return.param: bool [thunk @FDifferentImplicitParamType.as.J.impl.%FDifferentImplicitParamType.as.J.impl.F.decl.loc184_38.1 for @J.WithSelf.%J.WithSelf.F.decl, @J.WithSelf.F(constants.%J.facet.030)] { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %FDifferentImplicitParamType.as.J.impl.F.type.955391.1 = name_ref F, @FDifferentImplicitParamType.as.J.impl.%FDifferentImplicitParamType.as.J.impl.F.decl.loc184_38.1 [concrete = constants.%FDifferentImplicitParamType.as.J.impl.F.a9ece4.1] // CHECK:STDOUT: %FDifferentImplicitParamType.as.J.impl.F.bound: = bound_method %self.param, %F.ref @@ -1282,7 +1282,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: // CHECK:STDOUT: fn @FDifferentReturnType.as.J.impl.F.loc200_38.1(%self.param: bool, %b.param: bool) -> out %return.param: %FDifferentReturnType; // CHECK:STDOUT: -// CHECK:STDOUT: fn @FDifferentReturnType.as.J.impl.F.loc200_38.2(%self.param: bool, %b.param: bool) -> out %return.param: bool [thunk @FDifferentReturnType.as.J.impl.%FDifferentReturnType.as.J.impl.F.decl.loc200_38.1] { +// CHECK:STDOUT: fn @FDifferentReturnType.as.J.impl.F.loc200_38.2(%self.param: bool, %b.param: bool) -> out %return.param: bool [thunk @FDifferentReturnType.as.J.impl.%FDifferentReturnType.as.J.impl.F.decl.loc200_38.1 for @J.WithSelf.%J.WithSelf.F.decl, @J.WithSelf.F(constants.%J.facet.4a1)] { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %FDifferentReturnType.as.J.impl.F.type.7bcb67.1 = name_ref F, @FDifferentReturnType.as.J.impl.%FDifferentReturnType.as.J.impl.F.decl.loc200_38.1 [concrete = constants.%FDifferentReturnType.as.J.impl.F.a709b1.1] // CHECK:STDOUT: %FDifferentReturnType.as.J.impl.F.bound: = bound_method %self.param, %F.ref @@ -1309,7 +1309,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: // CHECK:STDOUT: fn @SelfNestedBadParam.as.SelfNested.impl.F.loc223_87.1(%x.param: %tuple.type.70f) -> out %return.param: %array_type.388; // CHECK:STDOUT: -// CHECK:STDOUT: fn @SelfNestedBadParam.as.SelfNested.impl.F.loc223_87.2(%x.param: %tuple.type.7ea) -> out %return.param: %array_type.388 [thunk @SelfNestedBadParam.as.SelfNested.impl.%SelfNestedBadParam.as.SelfNested.impl.F.decl.loc223_87.1] { +// CHECK:STDOUT: fn @SelfNestedBadParam.as.SelfNested.impl.F.loc223_87.2(%x.param: %tuple.type.7ea) -> out %return.param: %array_type.388 [thunk @SelfNestedBadParam.as.SelfNested.impl.%SelfNestedBadParam.as.SelfNested.impl.F.decl.loc223_87.1 for @SelfNested.WithSelf.%SelfNested.WithSelf.F.decl, @SelfNested.WithSelf.F(constants.%SelfNested.facet.b9f)] { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %SelfNestedBadParam.as.SelfNested.impl.F.type.789632.1 = name_ref F, @SelfNestedBadParam.as.SelfNested.impl.%SelfNestedBadParam.as.SelfNested.impl.F.decl.loc223_87.1 [concrete = constants.%SelfNestedBadParam.as.SelfNested.impl.F.6e1661.1] // CHECK:STDOUT: %.loc211_57: ref %array_type.388 = splice_block %return.param {} @@ -1323,7 +1323,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: // CHECK:STDOUT: fn @SelfNestedBadReturnType.as.SelfNested.impl.F.loc239_112.1(%x.param: %tuple.type.064) -> out %return.param: %array_type.388; // CHECK:STDOUT: -// CHECK:STDOUT: fn @SelfNestedBadReturnType.as.SelfNested.impl.F.loc239_112.2(%x.param: %tuple.type.064) -> out %return.param: %array_type.31b [thunk @SelfNestedBadReturnType.as.SelfNested.impl.%SelfNestedBadReturnType.as.SelfNested.impl.F.decl.loc239_112.1] { +// CHECK:STDOUT: fn @SelfNestedBadReturnType.as.SelfNested.impl.F.loc239_112.2(%x.param: %tuple.type.064) -> out %return.param: %array_type.31b [thunk @SelfNestedBadReturnType.as.SelfNested.impl.%SelfNestedBadReturnType.as.SelfNested.impl.F.decl.loc239_112.1 for @SelfNested.WithSelf.%SelfNested.WithSelf.F.decl, @SelfNested.WithSelf.F(constants.%SelfNested.facet.23f)] { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %SelfNestedBadReturnType.as.SelfNested.impl.F.type.75d128.1 = name_ref F, @SelfNestedBadReturnType.as.SelfNested.impl.%SelfNestedBadReturnType.as.SelfNested.impl.F.decl.loc239_112.1 [concrete = constants.%SelfNestedBadReturnType.as.SelfNested.impl.F.587f77.1] // CHECK:STDOUT: %.loc239_112.1: ref %array_type.388 = temporary_storage diff --git a/toolchain/check/testdata/impl/fail_self_type_mismatch.carbon b/toolchain/check/testdata/impl/fail_self_type_mismatch.carbon index 93714669d1f5..c29f89f080cc 100644 --- a/toolchain/check/testdata/impl/fail_self_type_mismatch.carbon +++ b/toolchain/check/testdata/impl/fail_self_type_mismatch.carbon @@ -255,7 +255,7 @@ impl i32 as I { // CHECK:STDOUT: // CHECK:STDOUT: fn @i32.as.I.impl.F.loc43_18.1(%c.param: %C.899); // CHECK:STDOUT: -// CHECK:STDOUT: fn @i32.as.I.impl.F.loc43_18.2(%c.param: %C.719) [thunk @i32.as.I.impl.%i32.as.I.impl.F.decl.loc43_18.1] { +// CHECK:STDOUT: fn @i32.as.I.impl.F.loc43_18.2(%c.param: %C.719) [thunk @i32.as.I.impl.%i32.as.I.impl.F.decl.loc43_18.1 for @I.WithSelf.%I.WithSelf.F.decl, @I.WithSelf.F(constants.%I.facet.20f)] { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %i32.as.I.impl.F.type.6c53e7.1 = name_ref F, @i32.as.I.impl.%i32.as.I.impl.F.decl.loc43_18.1 [concrete = constants.%i32.as.I.impl.F.7f652f.1] // CHECK:STDOUT: %.loc25: %C.899 = converted %c.param, [concrete = ] diff --git a/toolchain/check/testdata/impl/impl_thunk.carbon b/toolchain/check/testdata/impl/impl_thunk.carbon index b85f5d929e7c..660d53835678 100644 --- a/toolchain/check/testdata/impl/impl_thunk.carbon +++ b/toolchain/check/testdata/impl/impl_thunk.carbon @@ -343,12 +343,14 @@ impl () as I({}) { // CHECK:STDOUT: --- struct_conversion.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete] // CHECK:STDOUT: %struct_type.a.b.391: type = struct_type {.a: %empty_tuple.type, .b: %empty_struct_type} [concrete] // CHECK:STDOUT: %struct_type.c.d.15a: type = struct_type {.c: %empty_tuple.type, .d: %empty_struct_type} [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness @empty_tuple.type.as.I.impl.%I.impl_witness_table [concrete] // CHECK:STDOUT: %struct_type.b.a.40c: type = struct_type {.b: %empty_struct_type, .a: %empty_tuple.type} [concrete] // CHECK:STDOUT: %pattern_type.231: type = pattern_type %struct_type.b.a.40c [concrete] // CHECK:STDOUT: %struct_type.d.c.b36: type = struct_type {.d: %empty_struct_type, .c: %empty_tuple.type} [concrete] @@ -356,6 +358,7 @@ impl () as I({}) { // CHECK:STDOUT: %pattern_type.844: type = pattern_type %struct_type.d.c.b36 [concrete] // CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.type.19e4b8.1: type = fn_type @empty_tuple.type.as.I.impl.F.loc10_48.1 [concrete] // CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.8be29b.1: %empty_tuple.type.as.I.impl.F.type.19e4b8.1 = struct_value () [concrete] +// CHECK:STDOUT: %I.facet: %I.type = facet_value %empty_tuple.type, (%I.impl_witness) [concrete] // CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.type.19e4b8.2: type = fn_type @empty_tuple.type.as.I.impl.F.loc10_48.2 [concrete] // CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.8be29b.2: %empty_tuple.type.as.I.impl.F.type.19e4b8.2 = struct_value () [concrete] // CHECK:STDOUT: %struct: %struct_type.c.d.15a = struct_value (%empty_tuple, %empty_struct) [concrete] @@ -403,7 +406,7 @@ impl () as I({}) { // CHECK:STDOUT: // CHECK:STDOUT: fn @empty_tuple.type.as.I.impl.F.loc10_48.1(%y.param: %struct_type.b.a.40c) -> out %return.param: %struct_type.d.c.b36; // CHECK:STDOUT: -// CHECK:STDOUT: fn @empty_tuple.type.as.I.impl.F.loc10_48.2(%x.param: %struct_type.a.b.391) -> out %return.param: %struct_type.c.d.15a [thunk @empty_tuple.type.as.I.impl.%empty_tuple.type.as.I.impl.F.decl.loc10_48.1] { +// CHECK:STDOUT: fn @empty_tuple.type.as.I.impl.F.loc10_48.2(%x.param: %struct_type.a.b.391) -> out %return.param: %struct_type.c.d.15a [thunk @empty_tuple.type.as.I.impl.%empty_tuple.type.as.I.impl.F.decl.loc10_48.1 for @I.WithSelf.%I.WithSelf.F.decl, @I.WithSelf.F(constants.%I.facet)] { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %empty_tuple.type.as.I.impl.F.type.19e4b8.1 = name_ref F, @empty_tuple.type.as.I.impl.%empty_tuple.type.as.I.impl.F.decl.loc10_48.1 [concrete = constants.%empty_tuple.type.as.I.impl.F.8be29b.1] // CHECK:STDOUT: %.loc10_48.1: ref %struct_type.d.c.b36 = temporary_storage @@ -442,6 +445,8 @@ impl () as I({}) { // CHECK:STDOUT: %A: type = class_type @A [concrete] // CHECK:STDOUT: %B: type = class_type @B [concrete] // CHECK:STDOUT: %C: type = class_type @C [concrete] +// CHECK:STDOUT: %X.type: type = facet_type <@X> [concrete] +// CHECK:STDOUT: %X.impl_witness: = impl_witness @B.as.X.impl.%X.impl_witness_table [concrete] // CHECK:STDOUT: %pattern_type.1ab: type = pattern_type %A [concrete] // CHECK:STDOUT: %ptr.643: type = ptr_type %A [concrete] // CHECK:STDOUT: %pattern_type.f29: type = pattern_type %ptr.643 [concrete] @@ -450,6 +455,7 @@ impl () as I({}) { // CHECK:STDOUT: %pattern_type.506: type = pattern_type %ptr.31e [concrete] // CHECK:STDOUT: %B.as.X.impl.F.type.421a66.1: type = fn_type @B.as.X.impl.F.loc14_37.1 [concrete] // CHECK:STDOUT: %B.as.X.impl.F.8ec460.1: %B.as.X.impl.F.type.421a66.1 = struct_value () [concrete] +// CHECK:STDOUT: %X.facet: %X.type = facet_value %B, (%X.impl_witness) [concrete] // CHECK:STDOUT: %ptr.27c: type = ptr_type %B [concrete] // CHECK:STDOUT: %B.as.X.impl.F.type.421a66.2: type = fn_type @B.as.X.impl.F.loc14_37.2 [concrete] // CHECK:STDOUT: %B.as.X.impl.F.8ec460.2: %B.as.X.impl.F.type.421a66.2 = struct_value () [concrete] @@ -512,7 +518,7 @@ impl () as I({}) { // CHECK:STDOUT: // CHECK:STDOUT: fn @B.as.X.impl.F.loc14_37.1(%self.param: ref %A, %other.param: %ptr.643) -> out %return.param: %ptr.31e; // CHECK:STDOUT: -// CHECK:STDOUT: fn @B.as.X.impl.F.loc14_37.2(%self.param: ref %B, %other.param: %ptr.27c) -> out %return.param: %ptr.27c [thunk @B.as.X.impl.%B.as.X.impl.F.decl.loc14_37.1] { +// CHECK:STDOUT: fn @B.as.X.impl.F.loc14_37.2(%self.param: ref %B, %other.param: %ptr.27c) -> out %return.param: %ptr.27c [thunk @B.as.X.impl.%B.as.X.impl.F.decl.loc14_37.1 for @X.WithSelf.%X.WithSelf.F.decl, @X.WithSelf.F(constants.%X.facet)] { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %B.as.X.impl.F.type.421a66.1 = name_ref F, @B.as.X.impl.%B.as.X.impl.F.decl.loc14_37.1 [concrete = constants.%B.as.X.impl.F.8ec460.1] // CHECK:STDOUT: %B.as.X.impl.F.bound: = bound_method %self.param, %F.ref @@ -538,9 +544,12 @@ impl () as I({}) { // CHECK:STDOUT: %A: type = class_type @A [concrete] // CHECK:STDOUT: %B: type = class_type @B [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] +// CHECK:STDOUT: %X.type: type = facet_type <@X> [concrete] +// CHECK:STDOUT: %X.impl_witness: = impl_witness @B.as.X.impl.%X.impl_witness_table [concrete] // CHECK:STDOUT: %pattern_type.1ab: type = pattern_type %A [concrete] // CHECK:STDOUT: %B.as.X.impl.F.type.421a66.1: type = fn_type @B.as.X.impl.F.loc13_26.1 [concrete] // CHECK:STDOUT: %B.as.X.impl.F.8ec460.1: %B.as.X.impl.F.type.421a66.1 = struct_value () [concrete] +// CHECK:STDOUT: %X.facet: %X.type = facet_value %B, (%X.impl_witness) [concrete] // CHECK:STDOUT: %B.as.X.impl.F.type.421a66.2: type = fn_type @B.as.X.impl.F.loc13_26.2 [concrete] // CHECK:STDOUT: %B.as.X.impl.F.8ec460.2: %B.as.X.impl.F.type.421a66.2 = struct_value () [concrete] // CHECK:STDOUT: } @@ -574,7 +583,7 @@ impl () as I({}) { // CHECK:STDOUT: // CHECK:STDOUT: fn @B.as.X.impl.F.loc13_26.1(%self.param: %A, %other.param: %A); // CHECK:STDOUT: -// CHECK:STDOUT: fn @B.as.X.impl.F.loc13_26.2(%self.param: %B, %other.param: %B) [thunk @B.as.X.impl.%B.as.X.impl.F.decl.loc13_26.1] { +// CHECK:STDOUT: fn @B.as.X.impl.F.loc13_26.2(%self.param: %B, %other.param: %B) [thunk @B.as.X.impl.%B.as.X.impl.F.decl.loc13_26.1 for @X.WithSelf.%X.WithSelf.F.decl, @X.WithSelf.F(constants.%X.facet)] { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %B.as.X.impl.F.type.421a66.1 = name_ref F, @B.as.X.impl.%B.as.X.impl.F.decl.loc13_26.1 [concrete = constants.%B.as.X.impl.F.8ec460.1] // CHECK:STDOUT: %B.as.X.impl.F.bound: = bound_method %self.param, %F.ref @@ -589,6 +598,8 @@ impl () as I({}) { // CHECK:STDOUT: %A: type = class_type @A [concrete] // CHECK:STDOUT: %B: type = class_type @B [concrete] // CHECK:STDOUT: %C: type = class_type @C [concrete] +// CHECK:STDOUT: %X.type: type = facet_type <@X> [concrete] +// CHECK:STDOUT: %X.impl_witness: = impl_witness @B.as.X.impl.%X.impl_witness_table [concrete] // CHECK:STDOUT: %pattern_type.1ab: type = pattern_type %A [concrete] // CHECK:STDOUT: %ptr.643: type = ptr_type %A [concrete] // CHECK:STDOUT: %pattern_type.f29: type = pattern_type %ptr.643 [concrete] @@ -597,6 +608,7 @@ impl () as I({}) { // CHECK:STDOUT: %pattern_type.506: type = pattern_type %ptr.31e [concrete] // CHECK:STDOUT: %B.as.X.impl.F.type.421a66.1: type = fn_type @B.as.X.impl.F.loc14_37.1 [concrete] // CHECK:STDOUT: %B.as.X.impl.F.8ec460.1: %B.as.X.impl.F.type.421a66.1 = struct_value () [concrete] +// CHECK:STDOUT: %X.facet: %X.type = facet_value %B, (%X.impl_witness) [concrete] // CHECK:STDOUT: %ptr.27c: type = ptr_type %B [concrete] // CHECK:STDOUT: %B.as.X.impl.F.type.421a66.2: type = fn_type @B.as.X.impl.F.loc14_37.2 [concrete] // CHECK:STDOUT: %B.as.X.impl.F.8ec460.2: %B.as.X.impl.F.type.421a66.2 = struct_value () [concrete] @@ -659,7 +671,7 @@ impl () as I({}) { // CHECK:STDOUT: // CHECK:STDOUT: fn @B.as.X.impl.F.loc14_37.1(%self.param: ref %A, %other.param: %ptr.643) -> out %return.param: %ptr.31e; // CHECK:STDOUT: -// CHECK:STDOUT: fn @B.as.X.impl.F.loc14_37.2(%self.param: ref %B, %other.param: %ptr.27c) -> out %return.param: %ptr.27c [thunk @B.as.X.impl.%B.as.X.impl.F.decl.loc14_37.1] { +// CHECK:STDOUT: fn @B.as.X.impl.F.loc14_37.2(%self.param: ref %B, %other.param: %ptr.27c) -> out %return.param: %ptr.27c [thunk @B.as.X.impl.%B.as.X.impl.F.decl.loc14_37.1 for @X.WithSelf.%X.WithSelf.F.decl, @X.WithSelf.F(constants.%X.facet)] { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %B.as.X.impl.F.type.421a66.1 = name_ref F, @B.as.X.impl.%B.as.X.impl.F.decl.loc14_37.1 [concrete = constants.%B.as.X.impl.F.8ec460.1] // CHECK:STDOUT: %B.as.X.impl.F.bound: = bound_method %self.param, %F.ref @@ -685,6 +697,8 @@ impl () as I({}) { // CHECK:STDOUT: %A: type = class_type @A [concrete] // CHECK:STDOUT: %B: type = class_type @B [concrete] // CHECK:STDOUT: %C: type = class_type @C [concrete] +// CHECK:STDOUT: %X.type: type = facet_type <@X> [concrete] +// CHECK:STDOUT: %X.impl_witness: = impl_witness @B.as.X.impl.%X.impl_witness_table [concrete] // CHECK:STDOUT: %pattern_type.1ab: type = pattern_type %A [concrete] // CHECK:STDOUT: %ptr.643: type = ptr_type %A [concrete] // CHECK:STDOUT: %pattern_type.f29: type = pattern_type %ptr.643 [concrete] @@ -693,6 +707,7 @@ impl () as I({}) { // CHECK:STDOUT: %pattern_type.506: type = pattern_type %ptr.31e [concrete] // CHECK:STDOUT: %B.as.X.impl.F.type.421a66.1: type = fn_type @B.as.X.impl.F.loc14_37.1 [concrete] // CHECK:STDOUT: %B.as.X.impl.F.8ec460.1: %B.as.X.impl.F.type.421a66.1 = struct_value () [concrete] +// CHECK:STDOUT: %X.facet: %X.type = facet_value %B, (%X.impl_witness) [concrete] // CHECK:STDOUT: %ptr.27c: type = ptr_type %B [concrete] // CHECK:STDOUT: %B.as.X.impl.F.type.421a66.2: type = fn_type @B.as.X.impl.F.loc14_37.2 [concrete] // CHECK:STDOUT: %B.as.X.impl.F.8ec460.2: %B.as.X.impl.F.type.421a66.2 = struct_value () [concrete] @@ -755,7 +770,7 @@ impl () as I({}) { // CHECK:STDOUT: // CHECK:STDOUT: fn @B.as.X.impl.F.loc14_37.1(%self.param: ref %A, %other.param: %ptr.643) -> out %return.param: %ptr.31e; // CHECK:STDOUT: -// CHECK:STDOUT: fn @B.as.X.impl.F.loc14_37.2(%self.param: ref %B, %other.param: %ptr.27c) -> out %return.param: %ptr.27c [thunk @B.as.X.impl.%B.as.X.impl.F.decl.loc14_37.1] { +// CHECK:STDOUT: fn @B.as.X.impl.F.loc14_37.2(%self.param: ref %B, %other.param: %ptr.27c) -> out %return.param: %ptr.27c [thunk @B.as.X.impl.%B.as.X.impl.F.decl.loc14_37.1 for @X.WithSelf.%X.WithSelf.F.decl, @X.WithSelf.F(constants.%X.facet)] { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %B.as.X.impl.F.type.421a66.1 = name_ref F, @B.as.X.impl.%B.as.X.impl.F.decl.loc14_37.1 [concrete = constants.%B.as.X.impl.F.8ec460.1] // CHECK:STDOUT: %B.as.X.impl.F.bound: = bound_method %self.param, %F.ref @@ -781,9 +796,12 @@ impl () as I({}) { // CHECK:STDOUT: %A: type = class_type @A [concrete] // CHECK:STDOUT: %B: type = class_type @B [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] +// CHECK:STDOUT: %X.type: type = facet_type <@X> [concrete] +// CHECK:STDOUT: %X.impl_witness: = impl_witness @B.as.X.impl.%X.impl_witness_table [concrete] // CHECK:STDOUT: %pattern_type.1ab: type = pattern_type %A [concrete] // CHECK:STDOUT: %B.as.X.impl.F.type.421a66.1: type = fn_type @B.as.X.impl.F.loc13_30.1 [concrete] // CHECK:STDOUT: %B.as.X.impl.F.8ec460.1: %B.as.X.impl.F.type.421a66.1 = struct_value () [concrete] +// CHECK:STDOUT: %X.facet: %X.type = facet_value %B, (%X.impl_witness) [concrete] // CHECK:STDOUT: %B.as.X.impl.F.type.421a66.2: type = fn_type @B.as.X.impl.F.loc13_30.2 [concrete] // CHECK:STDOUT: %B.as.X.impl.F.8ec460.2: %B.as.X.impl.F.type.421a66.2 = struct_value () [concrete] // CHECK:STDOUT: } @@ -817,7 +835,7 @@ impl () as I({}) { // CHECK:STDOUT: // CHECK:STDOUT: fn @B.as.X.impl.F.loc13_30.1(%self.param: %A, %other.param: ref %A); // CHECK:STDOUT: -// CHECK:STDOUT: fn @B.as.X.impl.F.loc13_30.2(%self.param: %B, %other.param: ref %B) [thunk @B.as.X.impl.%B.as.X.impl.F.decl.loc13_30.1] { +// CHECK:STDOUT: fn @B.as.X.impl.F.loc13_30.2(%self.param: %B, %other.param: ref %B) [thunk @B.as.X.impl.%B.as.X.impl.F.decl.loc13_30.1 for @X.WithSelf.%X.WithSelf.F.decl, @X.WithSelf.F(constants.%X.facet)] { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %B.as.X.impl.F.type.421a66.1 = name_ref F, @B.as.X.impl.%B.as.X.impl.F.decl.loc13_30.1 [concrete = constants.%B.as.X.impl.F.8ec460.1] // CHECK:STDOUT: %B.as.X.impl.F.bound: = bound_method %self.param, %F.ref @@ -834,10 +852,13 @@ impl () as I({}) { // CHECK:STDOUT: %B: type = class_type @B [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %struct_type.base.5af: type = struct_type {.base: %A} [concrete] +// CHECK:STDOUT: %X.type: type = facet_type <@X> [concrete] +// CHECK:STDOUT: %X.impl_witness: = impl_witness @A.as.X.impl.%X.impl_witness_table [concrete] // CHECK:STDOUT: %.7df: Core.Form = init_form %B [concrete] // CHECK:STDOUT: %pattern_type.1f4: type = pattern_type %B [concrete] // CHECK:STDOUT: %A.as.X.impl.F.type.170a02.1: type = fn_type @A.as.X.impl.F.loc23_14.1 [concrete] // CHECK:STDOUT: %A.as.X.impl.F.e6cf46.1: %A.as.X.impl.F.type.170a02.1 = struct_value () [concrete] +// CHECK:STDOUT: %X.facet: %X.type = facet_value %A, (%X.impl_witness) [concrete] // CHECK:STDOUT: %A.as.X.impl.F.type.170a02.2: type = fn_type @A.as.X.impl.F.loc23_14.2 [concrete] // CHECK:STDOUT: %A.as.X.impl.F.e6cf46.2: %A.as.X.impl.F.type.170a02.2 = struct_value () [concrete] // CHECK:STDOUT: %Destroy.Op.type.bae255.4: type = fn_type @Destroy.Op.loc23_14.4 [concrete] @@ -870,7 +891,7 @@ impl () as I({}) { // CHECK:STDOUT: // CHECK:STDOUT: fn @A.as.X.impl.F.loc23_14.1() -> out %return.param: %B; // CHECK:STDOUT: -// CHECK:STDOUT: fn @A.as.X.impl.F.loc23_14.2() -> out %return.param: %A [thunk @A.as.X.impl.%A.as.X.impl.F.decl.loc23_14.1] { +// CHECK:STDOUT: fn @A.as.X.impl.F.loc23_14.2() -> out %return.param: %A [thunk @A.as.X.impl.%A.as.X.impl.F.decl.loc23_14.1 for @X.WithSelf.%X.WithSelf.F.decl, @X.WithSelf.F(constants.%X.facet)] { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %A.as.X.impl.F.type.170a02.1 = name_ref F, @A.as.X.impl.%A.as.X.impl.F.decl.loc23_14.1 [concrete = constants.%A.as.X.impl.F.e6cf46.1] // CHECK:STDOUT: %.loc23_14.1: ref %B = temporary_storage @@ -904,8 +925,11 @@ impl () as I({}) { // CHECK:STDOUT: --- generic_function.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete] // CHECK:STDOUT: %type: type = facet_type [concrete] // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self] +// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness @empty_tuple.type.as.I.impl.%I.impl_witness_table [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] // CHECK:STDOUT: %pattern_type.ce2: type = pattern_type %Copy.type [concrete] // CHECK:STDOUT: %U.035: %Copy.type = symbolic_binding U, 0 [symbolic] @@ -914,6 +938,7 @@ impl () as I({}) { // CHECK:STDOUT: %.435d17.2: Core.Form = init_form %U.as_type.255 [symbolic] // CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.type.19e4b8.1: type = fn_type @empty_tuple.type.as.I.impl.F.loc10_34.1 [concrete] // CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.8be29b.1: %empty_tuple.type.as.I.impl.F.type.19e4b8.1 = struct_value () [concrete] +// CHECK:STDOUT: %I.facet: %I.type = facet_value %empty_tuple.type, (%I.impl_witness) [concrete] // CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %ptr.e8f: type = ptr_type %T.67d [symbolic] // CHECK:STDOUT: %pattern_type.4f4: type = pattern_type %ptr.e8f [symbolic] @@ -1024,7 +1049,7 @@ impl () as I({}) { // CHECK:STDOUT: %Copy.facet.loc10_34.2: %Copy.type = facet_value %ptr, (%Copy.lookup_impl_witness) [symbolic = %Copy.facet.loc10_34.2 (constants.%Copy.facet)] // CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.specific_fn.loc10_34.2: = specific_function constants.%empty_tuple.type.as.I.impl.F.8be29b.1, @empty_tuple.type.as.I.impl.F.loc10_34.1(%Copy.facet.loc10_34.2) [symbolic = %empty_tuple.type.as.I.impl.F.specific_fn.loc10_34.2 (constants.%empty_tuple.type.as.I.impl.F.specific_fn)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param: @empty_tuple.type.as.I.impl.F.loc10_34.2.%ptr (%ptr.e8f)) -> out %return.param: @empty_tuple.type.as.I.impl.F.loc10_34.2.%ptr (%ptr.e8f) [thunk @empty_tuple.type.as.I.impl.%empty_tuple.type.as.I.impl.F.decl.loc10_34.1] { +// CHECK:STDOUT: fn(%x.param: @empty_tuple.type.as.I.impl.F.loc10_34.2.%ptr (%ptr.e8f)) -> out %return.param: @empty_tuple.type.as.I.impl.F.loc10_34.2.%ptr (%ptr.e8f) [thunk @empty_tuple.type.as.I.impl.%empty_tuple.type.as.I.impl.F.decl.loc10_34.1 for @I.WithSelf.%I.WithSelf.F.decl, @I.WithSelf.F(constants.%I.facet, constants.%T.67d)] { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %empty_tuple.type.as.I.impl.F.type.19e4b8.1 = name_ref F, @empty_tuple.type.as.I.impl.%empty_tuple.type.as.I.impl.F.decl.loc10_34.1 [concrete = constants.%empty_tuple.type.as.I.impl.F.8be29b.1] // CHECK:STDOUT: %Copy.facet.loc10_34.1: %Copy.type = facet_value constants.%ptr.e8f, (constants.%Copy.lookup_impl_witness.2e6) [symbolic = %Copy.facet.loc10_34.2 (constants.%Copy.facet)] @@ -1067,10 +1092,12 @@ impl () as I({}) { // CHECK:STDOUT: --- generic_method.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete] // CHECK:STDOUT: %type: type = facet_type [concrete] // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness @empty_tuple.type.as.I.impl.%I.impl_witness_table [concrete] // CHECK:STDOUT: %pattern_type.cb1: type = pattern_type %empty_tuple.type [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] // CHECK:STDOUT: %pattern_type.ce2: type = pattern_type %Copy.type [concrete] @@ -1080,6 +1107,7 @@ impl () as I({}) { // CHECK:STDOUT: %.435d17.2: Core.Form = init_form %U.as_type.255 [symbolic] // CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.type.19e4b8.1: type = fn_type @empty_tuple.type.as.I.impl.F.loc10_51.1 [concrete] // CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.8be29b.1: %empty_tuple.type.as.I.impl.F.type.19e4b8.1 = struct_value () [concrete] +// CHECK:STDOUT: %I.facet: %I.type = facet_value %empty_tuple.type, (%I.impl_witness) [concrete] // CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %ptr.e8f: type = ptr_type %T.67d [symbolic] // CHECK:STDOUT: %pattern_type.4f4: type = pattern_type %ptr.e8f [symbolic] @@ -1198,7 +1226,7 @@ impl () as I({}) { // CHECK:STDOUT: %Copy.facet.loc10_51.2: %Copy.type = facet_value %ptr, (%Copy.lookup_impl_witness) [symbolic = %Copy.facet.loc10_51.2 (constants.%Copy.facet)] // CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.specific_fn.loc10_51.2: = specific_function constants.%empty_tuple.type.as.I.impl.F.8be29b.1, @empty_tuple.type.as.I.impl.F.loc10_51.1(%Copy.facet.loc10_51.2) [symbolic = %empty_tuple.type.as.I.impl.F.specific_fn.loc10_51.2 (constants.%empty_tuple.type.as.I.impl.F.specific_fn)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: %empty_tuple.type, %x.param: @empty_tuple.type.as.I.impl.F.loc10_51.2.%ptr (%ptr.e8f)) -> out %return.param: @empty_tuple.type.as.I.impl.F.loc10_51.2.%ptr (%ptr.e8f) [thunk @empty_tuple.type.as.I.impl.%empty_tuple.type.as.I.impl.F.decl.loc10_51.1] { +// CHECK:STDOUT: fn(%self.param: %empty_tuple.type, %x.param: @empty_tuple.type.as.I.impl.F.loc10_51.2.%ptr (%ptr.e8f)) -> out %return.param: @empty_tuple.type.as.I.impl.F.loc10_51.2.%ptr (%ptr.e8f) [thunk @empty_tuple.type.as.I.impl.%empty_tuple.type.as.I.impl.F.decl.loc10_51.1 for @I.WithSelf.%I.WithSelf.F.decl, @I.WithSelf.F(constants.%I.facet, constants.%T.67d)] { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %empty_tuple.type.as.I.impl.F.type.19e4b8.1 = name_ref F, @empty_tuple.type.as.I.impl.%empty_tuple.type.as.I.impl.F.decl.loc10_51.1 [concrete = constants.%empty_tuple.type.as.I.impl.F.8be29b.1] // CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.bound: = bound_method %self.param, %F.ref @@ -1246,11 +1274,14 @@ impl () as I({}) { // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete] +// CHECK:STDOUT: %I.type.ab5: type = facet_type <@I, @I(%empty_struct_type)> [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness @empty_tuple.type.as.I.impl.%I.impl_witness_table [concrete] // CHECK:STDOUT: %struct_type.b.a.1b0: type = struct_type {.b: %empty_struct_type, .a: %empty_struct_type} [concrete] // CHECK:STDOUT: %.3fc: Core.Form = init_form %struct_type.b.a.1b0 [concrete] // CHECK:STDOUT: %pattern_type.914: type = pattern_type %struct_type.b.a.1b0 [concrete] // CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.type.e82c13.1: type = fn_type @empty_tuple.type.as.I.impl.F.loc10_29.1 [concrete] // CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.5f0cef.1: %empty_tuple.type.as.I.impl.F.type.e82c13.1 = struct_value () [concrete] +// CHECK:STDOUT: %I.facet: %I.type.ab5 = facet_value %empty_tuple.type, (%I.impl_witness) [concrete] // CHECK:STDOUT: %struct_type.a.b.f95: type = struct_type {.a: %empty_struct_type, .b: %empty_struct_type} [concrete] // CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.type.e82c13.2: type = fn_type @empty_tuple.type.as.I.impl.F.loc10_29.2 [concrete] // CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.5f0cef.2: %empty_tuple.type.as.I.impl.F.type.e82c13.2 = struct_value () [concrete] @@ -1288,7 +1319,7 @@ impl () as I({}) { // CHECK:STDOUT: // CHECK:STDOUT: fn @empty_tuple.type.as.I.impl.F.loc10_29.1() -> out %return.param: %struct_type.b.a.1b0; // CHECK:STDOUT: -// CHECK:STDOUT: fn @empty_tuple.type.as.I.impl.F.loc10_29.2() -> out %return.param: %struct_type.a.b.f95 [thunk @empty_tuple.type.as.I.impl.%empty_tuple.type.as.I.impl.F.decl.loc10_29.1] { +// CHECK:STDOUT: fn @empty_tuple.type.as.I.impl.F.loc10_29.2() -> out %return.param: %struct_type.a.b.f95 [thunk @empty_tuple.type.as.I.impl.%empty_tuple.type.as.I.impl.F.decl.loc10_29.1 for @I.WithSelf.%I.WithSelf.F.decl, @I.WithSelf.F(constants.%empty_struct_type, constants.%I.facet)] { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %empty_tuple.type.as.I.impl.F.type.e82c13.1 = name_ref F, @empty_tuple.type.as.I.impl.%empty_tuple.type.as.I.impl.F.decl.loc10_29.1 [concrete = constants.%empty_tuple.type.as.I.impl.F.5f0cef.1] // CHECK:STDOUT: %.loc10_29.1: ref %struct_type.b.a.1b0 = temporary_storage diff --git a/toolchain/check/testdata/impl/import_thunk.carbon b/toolchain/check/testdata/impl/import_thunk.carbon index 8bb17ca0bb76..55350f5d794c 100644 --- a/toolchain/check/testdata/impl/import_thunk.carbon +++ b/toolchain/check/testdata/impl/import_thunk.carbon @@ -164,6 +164,7 @@ fn G() { // CHECK:STDOUT: } // CHECK:STDOUT: %Main.import_ref.7f4 = import_ref Main//a, loc5_14, unloaded // CHECK:STDOUT: %Main.F: @I.WithSelf.%I.WithSelf.F.type (%I.WithSelf.F.type.a1f) = import_ref Main//a, F, loaded [symbolic = @I.WithSelf.%I.WithSelf.F (constants.%I.WithSelf.F.cc3)] +// CHECK:STDOUT: %I.WithSelf.F.decl: %I.WithSelf.F.type.a1f = fn_decl @I.WithSelf.F [symbolic = @I.WithSelf.%I.WithSelf.F (constants.%I.WithSelf.F.cc3)] {} {} // CHECK:STDOUT: %Main.import_ref.2362f8.2: %I.type = import_ref Main//a, loc4_13, loaded [symbolic = constants.%Self.651] // CHECK:STDOUT: %Main.import_ref.c82 = import_ref Main//a, loc4_13, unloaded // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] @@ -307,7 +308,7 @@ fn G() { // CHECK:STDOUT: %specific_impl_fn.2: = specific_impl_function %impl.elem0.2, @Destroy.WithSelf.Op(%Destroy.facet) [symbolic = %specific_impl_fn.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: %bound_method.4: = bound_method %.6, %specific_impl_fn.2 [symbolic = %bound_method.4 (constants.%bound_method.fc8)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param: %empty_struct_type) [thunk @C.as.I.impl.%C.as.I.impl.F.decl.loc8_24.1] { +// 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: // CHECK:STDOUT: %.loc8: @C.as.I.impl.F.loc8_24.2.%C.as.I.impl.F.type (%C.as.I.impl.F.type.cf838e.1) = specific_constant @C.as.I.impl.%C.as.I.impl.F.decl.loc8_24.1, @C.as.I.impl(constants.%Y) [symbolic = %C.as.I.impl.F (constants.%C.as.I.impl.F.421e41.1)] // CHECK:STDOUT: %F.ref: @C.as.I.impl.F.loc8_24.2.%C.as.I.impl.F.type (%C.as.I.impl.F.type.cf838e.1) = name_ref F, %.loc8 [symbolic = %C.as.I.impl.F (constants.%C.as.I.impl.F.421e41.1)] @@ -405,6 +406,11 @@ fn G() { // CHECK:STDOUT: %I.impl_witness.e46: = impl_witness imports.%I.impl_witness_table, @C.as.I.impl(%Y) [symbolic] // CHECK:STDOUT: %C.as.I.impl.F.type.627915.1: type = fn_type @C.as.I.impl.F.1, @C.as.I.impl(%Y) [symbolic] // CHECK:STDOUT: %C.as.I.impl.F.7061c2.1: %C.as.I.impl.F.type.627915.1 = struct_value () [symbolic] +// CHECK:STDOUT: %C.as.I.impl.F.type.627915.2: type = fn_type @C.as.I.impl.F.2, @C.as.I.impl(%Y) [symbolic] +// CHECK:STDOUT: %C.as.I.impl.F.7061c2.2: %C.as.I.impl.F.type.627915.2 = struct_value () [symbolic] +// CHECK:STDOUT: %pattern_type.fb2: type = pattern_type %C.c8540f.2 [symbolic] +// CHECK:STDOUT: %require_complete: = require_complete_type %C.c8540f.2 [symbolic] +// CHECK:STDOUT: %I.facet.330: %I.type = facet_value %C.c8540f.2, (%I.impl_witness.e46) [symbolic] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] // CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %C.c8540f.2, @Destroy [symbolic] // CHECK:STDOUT: %Destroy.facet.3bf: %Destroy.type = facet_value %C.c8540f.2, (%Destroy.lookup_impl_witness) [symbolic] @@ -412,12 +418,8 @@ fn G() { // CHECK:STDOUT: %.634: type = fn_type_with_self_type %Destroy.WithSelf.Op.type.696, %Destroy.facet.3bf [symbolic] // CHECK:STDOUT: %impl.elem0: %.634 = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic] // CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem0, @Destroy.WithSelf.Op(%Destroy.facet.3bf) [symbolic] -// CHECK:STDOUT: %pattern_type.fb2: type = pattern_type %C.c8540f.2 [symbolic] // CHECK:STDOUT: %C.val.6cb: %C.c8540f.2 = struct_value () [symbolic] // CHECK:STDOUT: %.5fa: ref %C.c8540f.2 = temporary invalid, %C.val.6cb [symbolic] -// CHECK:STDOUT: %C.as.I.impl.F.type.627915.2: type = fn_type @C.as.I.impl.F.2, @C.as.I.impl(%Y) [symbolic] -// CHECK:STDOUT: %C.as.I.impl.F.7061c2.2: %C.as.I.impl.F.type.627915.2 = struct_value () [symbolic] -// CHECK:STDOUT: %require_complete: = require_complete_type %C.c8540f.2 [symbolic] // CHECK:STDOUT: %bound_method.ff8: = bound_method %.5fa, %specific_impl_fn [symbolic] // CHECK:STDOUT: %bound_method.88b: = bound_method %.5fa, %impl.elem0 [symbolic] // CHECK:STDOUT: %C.as.I.impl.F.specific_fn.b2d: = specific_function %C.as.I.impl.F.7061c2.2, @C.as.I.impl.F.2(%Y) [symbolic] @@ -426,10 +428,10 @@ fn G() { // CHECK:STDOUT: %C.as.I.impl.F.be0bb4.1: %C.as.I.impl.F.type.1bc610.1 = struct_value () [concrete] // CHECK:STDOUT: %C.as.I.impl.F.type.1bc610.2: type = fn_type @C.as.I.impl.F.1, @C.as.I.impl(%empty_tuple) [concrete] // CHECK:STDOUT: %C.as.I.impl.F.be0bb4.2: %C.as.I.impl.F.type.1bc610.2 = struct_value () [concrete] -// CHECK:STDOUT: %I.facet: %I.type = facet_value %C.387, (%I.impl_witness.b70) [concrete] -// CHECK:STDOUT: %I.WithSelf.F.type.0c4: type = fn_type @I.WithSelf.F, @I.WithSelf(%I.facet) [concrete] +// CHECK:STDOUT: %I.facet.478: %I.type = facet_value %C.387, (%I.impl_witness.b70) [concrete] +// CHECK:STDOUT: %I.WithSelf.F.type.0c4: type = fn_type @I.WithSelf.F, @I.WithSelf(%I.facet.478) [concrete] // CHECK:STDOUT: %I.WithSelf.F.b2b: %I.WithSelf.F.type.0c4 = struct_value () [concrete] -// CHECK:STDOUT: %.25a: type = fn_type_with_self_type %I.WithSelf.F.type.0c4, %I.facet [concrete] +// CHECK:STDOUT: %.25a: type = fn_type_with_self_type %I.WithSelf.F.type.0c4, %I.facet.478 [concrete] // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete] // CHECK:STDOUT: %C.as.I.impl.F.specific_fn.53944e.1: = specific_function %C.as.I.impl.F.be0bb4.2, @C.as.I.impl.F.1(%empty_tuple) [concrete] // CHECK:STDOUT: %pattern_type.678: type = pattern_type %C.387 [concrete] @@ -458,14 +460,15 @@ fn G() { // CHECK:STDOUT: %Main.import_ref.c90e1a.1: %empty_tuple.type = import_ref Main//b, loc5_10, loaded [symbolic = @C.%X (constants.%X)] // CHECK:STDOUT: %Main.import_ref.a54: %I.assoc_type = import_ref Main//a, loc5_14, loaded [concrete = constants.%assoc0.a42] // CHECK:STDOUT: %Main.F.768 = import_ref Main//a, F, unloaded +// CHECK:STDOUT: %I.WithSelf.F.decl: %I.WithSelf.F.type.a1f = fn_decl @I.WithSelf.F [symbolic = @I.WithSelf.%I.WithSelf.F (constants.%I.WithSelf.F.cc3)] {} {} // CHECK:STDOUT: %Main.import_ref.2362f8.2: %I.type = import_ref Main//a, loc4_13, loaded [symbolic = constants.%Self.651] // CHECK:STDOUT: %Main.import_ref.c82 = import_ref Main//a, loc4_13, unloaded // CHECK:STDOUT: %Main.import_ref.972: @I.WithSelf.%I.WithSelf.F.type (%I.WithSelf.F.type.a1f) = import_ref Main//a, loc5_14, loaded [symbolic = @I.WithSelf.%I.WithSelf.F (constants.%I.WithSelf.F.cc3)] // CHECK:STDOUT: %Main.import_ref.e97: = import_ref Main//b, loc7_32, loaded [symbolic = @C.as.I.impl.%I.impl_witness (constants.%I.impl_witness.e46)] // CHECK:STDOUT: %Main.import_ref.09c: @C.as.I.impl.%C.as.I.impl.F.type.2 (%C.as.I.impl.F.type.627915.1) = import_ref Main//b, loc8_24, loaded [symbolic = @C.as.I.impl.%C.as.I.impl.F.2 (constants.%C.as.I.impl.F.7061c2.1)] // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (%Main.import_ref.09c), @C.as.I.impl [concrete] -// CHECK:STDOUT: %Main.F.d0d: @C.as.I.impl.%C.as.I.impl.F.type.1 (%C.as.I.impl.F.type.627915.2) = import_ref Main//b, F, loaded [symbolic = @C.as.I.impl.%C.as.I.impl.F.1 (constants.%C.as.I.impl.F.7061c2.2)] // 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.d0d: @C.as.I.impl.%C.as.I.impl.F.type.1 (%C.as.I.impl.F.type.627915.2) = import_ref Main//b, F, loaded [symbolic = @C.as.I.impl.%C.as.I.impl.F.1 (constants.%C.as.I.impl.F.7061c2.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.2e2: type = import_ref Main//b, loc7_25, loaded [symbolic = @C.as.I.impl.%C (constants.%C.c8540f.2)] // CHECK:STDOUT: %Main.import_ref.91f: type = import_ref Main//b, loc7_30, loaded [concrete = constants.%I.type] @@ -533,8 +536,8 @@ fn G() { // CHECK:STDOUT: %C: type = class_type @C, @C(constants.%empty_tuple) [concrete = constants.%C.387] // CHECK:STDOUT: %I.ref: type = name_ref I, imports.%Main.I [concrete = constants.%I.type] // CHECK:STDOUT: %F.ref.loc7_11: %I.assoc_type = name_ref F, imports.%Main.import_ref.a54 [concrete = constants.%assoc0.a42] -// CHECK:STDOUT: %I.facet: %I.type = facet_value %C, (constants.%I.impl_witness.b70) [concrete = constants.%I.facet] -// CHECK:STDOUT: %.loc7_8: %I.type = converted %C, %I.facet [concrete = constants.%I.facet] +// CHECK:STDOUT: %I.facet: %I.type = facet_value %C, (constants.%I.impl_witness.b70) [concrete = constants.%I.facet.478] +// CHECK:STDOUT: %.loc7_8: %I.type = converted %C, %I.facet [concrete = constants.%I.facet.478] // CHECK:STDOUT: %impl.elem0: %.25a = impl_witness_access constants.%I.impl_witness.b70, element0 [concrete = constants.%C.as.I.impl.F.be0bb4.2] // CHECK:STDOUT: %.loc7_16.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] // CHECK:STDOUT: %empty_struct.loc7_16.1: %empty_struct_type = struct_value () [concrete = constants.%empty_struct] @@ -559,7 +562,7 @@ fn G() { // CHECK:STDOUT: fn; // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @C.as.I.impl.F.1(imports.%Main.import_ref.c90e1a.2: %empty_tuple.type) [from "b.carbon"] { +// CHECK:STDOUT: generic fn @C.as.I.impl.F.1(imports.%Main.import_ref.c90e1a.3: %empty_tuple.type) [from "b.carbon"] { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Y: %empty_tuple.type = symbolic_binding Y, 0 [symbolic = %Y (constants.%Y)] // CHECK:STDOUT: %C.as.I.impl.F.type: type = fn_type @C.as.I.impl.F.2, @C.as.I.impl(%Y) [symbolic = %C.as.I.impl.F.type (constants.%C.as.I.impl.F.type.627915.2)] @@ -578,10 +581,10 @@ fn G() { // CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem0, @Destroy.WithSelf.Op(%Destroy.facet) [symbolic = %specific_impl_fn (constants.%specific_impl_fn)] // CHECK:STDOUT: %bound_method.2: = bound_method %.1, %specific_impl_fn [symbolic = %bound_method.2 (constants.%bound_method.ff8)] // CHECK:STDOUT: -// CHECK:STDOUT: fn [thunk imports.%Main.F.d0d]; +// CHECK:STDOUT: fn [thunk imports.%Main.F.d0d for imports.%I.WithSelf.F.decl, @I.WithSelf.F(constants.%I.facet.330)]; // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @C.as.I.impl.F.2(imports.%Main.import_ref.c90e1a.3: %empty_tuple.type) [from "b.carbon"] { +// CHECK:STDOUT: generic fn @C.as.I.impl.F.2(imports.%Main.import_ref.c90e1a.2: %empty_tuple.type) [from "b.carbon"] { // CHECK:STDOUT: %Y: %empty_tuple.type = symbolic_binding Y, 0 [symbolic = %Y (constants.%Y)] // CHECK:STDOUT: %C: type = class_type @C, @C(%Y) [symbolic = %C (constants.%C.c8540f.2)] // CHECK:STDOUT: %pattern_type: type = pattern_type %C [symbolic = %pattern_type (constants.%pattern_type.fb2)] @@ -645,6 +648,8 @@ fn G() { // CHECK:STDOUT: %require_complete => constants.%require_complete // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @I.WithSelf.F(constants.%I.facet.330) {} +// CHECK:STDOUT: // CHECK:STDOUT: specific @C.as.I.impl.F.1(constants.%Y) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @C.as.I.impl(constants.%empty_tuple) { @@ -659,9 +664,9 @@ fn G() { // CHECK:STDOUT: %C.as.I.impl.F.2 => constants.%C.as.I.impl.F.be0bb4.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I.WithSelf(constants.%I.facet) { +// CHECK:STDOUT: specific @I.WithSelf(constants.%I.facet.478) { // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Self => constants.%I.facet +// CHECK:STDOUT: %Self => constants.%I.facet.478 // CHECK:STDOUT: %I.WithSelf.F.type => constants.%I.WithSelf.F.type.0c4 // CHECK:STDOUT: %I.WithSelf.F => constants.%I.WithSelf.F.b2b // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/impl/use_assoc_entity.carbon b/toolchain/check/testdata/impl/use_assoc_entity.carbon index 8c6bc11fd81a..f96fc4724155 100644 --- a/toolchain/check/testdata/impl/use_assoc_entity.carbon +++ b/toolchain/check/testdata/impl/use_assoc_entity.carbon @@ -2727,7 +2727,7 @@ fn F() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @E.as.J.impl.F.loc27_21.2(%u.param: %i32) -> out %return.param: %i32 [thunk @E.as.J.impl.%E.as.J.impl.F.decl.loc27_21.1] { +// CHECK:STDOUT: fn @E.as.J.impl.F.loc27_21.2(%u.param: %i32) -> out %return.param: %i32 [thunk @E.as.J.impl.%E.as.J.impl.F.decl.loc27_21.1 for @J.WithSelf.%J.WithSelf.F.decl, @J.WithSelf.F(constants.%J.facet)] { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %E.as.J.impl.F.type.4b5c2a.1 = name_ref F, @E.as.J.impl.%E.as.J.impl.F.decl.loc27_21.1 [concrete = constants.%E.as.J.impl.F.b4e6ab.1] // CHECK:STDOUT: %E.as.J.impl.F.call: = call %F.ref() @@ -3455,7 +3455,7 @@ fn F() { // CHECK:STDOUT: return %.loc23_50 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @empty_tuple.type.as.J2.impl.F.loc23_40.2(%self.param: %empty_tuple.type) -> [thunk @empty_tuple.type.as.J2.impl.%empty_tuple.type.as.J2.impl.F.decl.loc23_40.1] { +// CHECK:STDOUT: fn @empty_tuple.type.as.J2.impl.F.loc23_40.2(%self.param: %empty_tuple.type) -> [thunk @empty_tuple.type.as.J2.impl.%empty_tuple.type.as.J2.impl.F.decl.loc23_40.1 for @J2.WithSelf.%J2.WithSelf.F.decl, @J2.WithSelf.F(constants.%J2.facet.6c9)] { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %empty_tuple.type.as.J2.impl.F.type.56bdaf.1 = name_ref F, @empty_tuple.type.as.J2.impl.%empty_tuple.type.as.J2.impl.F.decl.loc23_40.1 [concrete = constants.%empty_tuple.type.as.J2.impl.F.7b8679.1] // CHECK:STDOUT: %empty_tuple.type.as.J2.impl.F.bound: = bound_method %self.param, %F.ref @@ -3473,7 +3473,7 @@ fn F() { // CHECK:STDOUT: return %.loc32_53.4 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @C2.as.J2.impl.F.loc32_40.2(%self.param: %C2) -> [thunk @C2.as.J2.impl.%C2.as.J2.impl.F.decl.loc32_40.1] { +// CHECK:STDOUT: fn @C2.as.J2.impl.F.loc32_40.2(%self.param: %C2) -> [thunk @C2.as.J2.impl.%C2.as.J2.impl.F.decl.loc32_40.1 for @J2.WithSelf.%J2.WithSelf.F.decl, @J2.WithSelf.F(constants.%J2.facet.f19)] { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %C2.as.J2.impl.F.type.d2a210.1 = name_ref F, @C2.as.J2.impl.%C2.as.J2.impl.F.decl.loc32_40.1 [concrete = constants.%C2.as.J2.impl.F.720bb2.1] // CHECK:STDOUT: %C2.as.J2.impl.F.bound: = bound_method %self.param, %F.ref @@ -3730,7 +3730,7 @@ fn F() { // CHECK:STDOUT: return %.loc26_62 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @empty_tuple.type.as.K.impl.F.loc26_52.2(%self.param: %empty_tuple.type, %v.param: %struct_type.a) -> out %return.param: %struct_type.a [thunk @empty_tuple.type.as.K.impl.%empty_tuple.type.as.K.impl.F.decl.loc26_52.1] { +// CHECK:STDOUT: fn @empty_tuple.type.as.K.impl.F.loc26_52.2(%self.param: %empty_tuple.type, %v.param: %struct_type.a) -> out %return.param: %struct_type.a [thunk @empty_tuple.type.as.K.impl.%empty_tuple.type.as.K.impl.F.decl.loc26_52.1 for @K.WithSelf.%K.WithSelf.F.decl, @K.WithSelf.F(constants.%K.facet)] { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %empty_tuple.type.as.K.impl.F.type.1710d5.1 = name_ref F, @empty_tuple.type.as.K.impl.%empty_tuple.type.as.K.impl.F.decl.loc26_52.1 [concrete = constants.%empty_tuple.type.as.K.impl.F.907e52.1] // CHECK:STDOUT: %empty_tuple.type.as.K.impl.F.bound: = bound_method %self.param, %F.ref 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 8d448f8d1cfd..426ec89d80c6 100644 --- a/toolchain/check/testdata/interop/cpp/function/import/default_arg.carbon +++ b/toolchain/check/testdata/interop/cpp/function/import/default_arg.carbon @@ -478,8 +478,13 @@ fn Call() { // CHECK:STDOUT: %D__carbon_thunk.type: type = fn_type @D__carbon_thunk [concrete] // CHECK:STDOUT: %D__carbon_thunk: %D__carbon_thunk.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %Self.765: %Destroy.type = symbolic_binding Self, 0 [symbolic] +// CHECK:STDOUT: %Destroy.WithSelf.Op.type.cb2: type = fn_type @Destroy.WithSelf.Op, @Destroy.WithSelf(%Self.765) [symbolic] +// CHECK:STDOUT: %Destroy.WithSelf.Op.9f1: %Destroy.WithSelf.Op.type.cb2 = 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: %custom_witness.efb: = custom_witness (), @Destroy [concrete] +// CHECK:STDOUT: %Destroy.facet.2e4: %Destroy.type = facet_value %X, (%custom_witness.efb) [concrete] // CHECK:STDOUT: %X.Op.type: type = fn_type @X.Op [concrete] // CHECK:STDOUT: %X.Op: %X.Op.type = struct_value () [concrete] // CHECK:STDOUT: } @@ -632,6 +637,7 @@ fn Call() { // CHECK:STDOUT: %a: %i32 = value_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.Op.decl: %Destroy.WithSelf.Op.type.cb2 = fn_decl @Destroy.WithSelf.Op [symbolic = @Destroy.WithSelf.%Destroy.WithSelf.Op (constants.%Destroy.WithSelf.Op.9f1)] {} {} // 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.46b = ref_param_pattern [concrete] // CHECK:STDOUT: %self.patt: %pattern_type.46b = at_binding_pattern self, %self.param_patt [concrete] @@ -829,7 +835,7 @@ fn Call() { // CHECK:STDOUT: // CHECK:STDOUT: fn @X.cpp_destructor(%self.param: ref %X) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @X.Op(%self.param: ref %X) [thunk imports.%X.cpp_destructor.decl] { +// CHECK:STDOUT: fn @X.Op(%self.param: ref %X) [thunk imports.%X.cpp_destructor.decl for imports.%Destroy.WithSelf.Op.decl, @Destroy.WithSelf.Op(constants.%Destroy.facet.2e4)] { // CHECK:STDOUT: !entry: // 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 diff --git a/toolchain/check/testdata/interop/cpp/impls/destroy.carbon b/toolchain/check/testdata/interop/cpp/impls/destroy.carbon index 0671a02631c6..b9882b5e0eb4 100644 --- a/toolchain/check/testdata/interop/cpp/impls/destroy.carbon +++ b/toolchain/check/testdata/interop/cpp/impls/destroy.carbon @@ -213,8 +213,12 @@ fn EqualWitnesses(p: Wrap(Cpp.PublicDestructor)*) -> Wrap(Cpp.PublicDestructor)* // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete] // CHECK:STDOUT: %PublicDestructor.val: %PublicDestructor = 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.Op.type.cb2: type = fn_type @Destroy.WithSelf.Op, @Destroy.WithSelf(%Self) [symbolic] +// CHECK:STDOUT: %Destroy.WithSelf.Op.9f1: %Destroy.WithSelf.Op.type.cb2 = 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: %custom_witness.efb: = custom_witness (), @Destroy [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] @@ -222,6 +226,7 @@ fn EqualWitnesses(p: Wrap(Cpp.PublicDestructor)*) -> Wrap(Cpp.PublicDestructor)* // CHECK:STDOUT: %TrivialDestructor.val: %TrivialDestructor = struct_value () [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.facet.a0b: %Destroy.type = facet_value %TrivialDestructor, (%custom_witness.efb) [concrete] // CHECK:STDOUT: %TrivialDestructor.Op.type: type = fn_type @TrivialDestructor.Op [concrete] // CHECK:STDOUT: %TrivialDestructor.Op: %TrivialDestructor.Op.type = struct_value () [concrete] // CHECK:STDOUT: } @@ -239,6 +244,7 @@ fn EqualWitnesses(p: Wrap(Cpp.PublicDestructor)*) -> Wrap(Cpp.PublicDestructor)* // 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.Op.decl: %Destroy.WithSelf.Op.type.cb2 = fn_decl @Destroy.WithSelf.Op [symbolic = @Destroy.WithSelf.%Destroy.WithSelf.Op (constants.%Destroy.WithSelf.Op.9f1)] {} {} // 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.1b8 = ref_param_pattern [concrete] @@ -337,7 +343,7 @@ fn EqualWitnesses(p: Wrap(Cpp.PublicDestructor)*) -> Wrap(Cpp.PublicDestructor)* // CHECK:STDOUT: // CHECK:STDOUT: fn @TrivialDestructor.cpp_destructor(%self.param: ref %TrivialDestructor) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @TrivialDestructor.Op(%self.param: ref %TrivialDestructor) [thunk imports.%TrivialDestructor.cpp_destructor.decl] { +// CHECK:STDOUT: fn @TrivialDestructor.Op(%self.param: ref %TrivialDestructor) [thunk imports.%TrivialDestructor.cpp_destructor.decl for imports.%Destroy.WithSelf.Op.decl, @Destroy.WithSelf.Op(constants.%Destroy.facet.a0b)] { // CHECK:STDOUT: !entry: // 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 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 e932e8091bd9..981bcbf8a9a9 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 @@ -1443,32 +1443,32 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %int_1.5a4: %Cpp.long = int_value 1 [concrete] // CHECK:STDOUT: %EqWith.type.494: type = facet_type <@EqWith, @EqWith(%Cpp.long)> [concrete] // CHECK:STDOUT: %EqWith.impl_witness.060: = impl_witness imports.%EqWith.impl_witness_table.e7b [concrete] -// CHECK:STDOUT: %EqWith.facet: %EqWith.type.494 = facet_value %Cpp.long, (%EqWith.impl_witness.060) [concrete] -// CHECK:STDOUT: %EqWith.WithSelf.Equal.type.17e: type = fn_type @EqWith.WithSelf.Equal, @EqWith.WithSelf(%Cpp.long, %EqWith.facet) [concrete] -// CHECK:STDOUT: %EqWith.WithSelf.NotEqual.type.ed4: type = fn_type @EqWith.WithSelf.NotEqual, @EqWith.WithSelf(%Cpp.long, %EqWith.facet) [concrete] -// CHECK:STDOUT: %.e84: type = fn_type_with_self_type %EqWith.WithSelf.Equal.type.17e, %EqWith.facet [concrete] +// CHECK:STDOUT: %EqWith.facet.646: %EqWith.type.494 = facet_value %Cpp.long, (%EqWith.impl_witness.060) [concrete] +// CHECK:STDOUT: %EqWith.WithSelf.Equal.type.17e: type = fn_type @EqWith.WithSelf.Equal, @EqWith.WithSelf(%Cpp.long, %EqWith.facet.646) [concrete] +// CHECK:STDOUT: %EqWith.WithSelf.NotEqual.type.ed4: type = fn_type @EqWith.WithSelf.NotEqual, @EqWith.WithSelf(%Cpp.long, %EqWith.facet.646) [concrete] +// CHECK:STDOUT: %.e84: type = fn_type_with_self_type %EqWith.WithSelf.Equal.type.17e, %EqWith.facet.646 [concrete] // CHECK:STDOUT: %Cpp.long.as.EqWith.impl.Equal.type.be1: type = fn_type @Cpp.long.as.EqWith.impl.Equal.3 [concrete] // CHECK:STDOUT: %Cpp.long.as.EqWith.impl.Equal.3d5: %Cpp.long.as.EqWith.impl.Equal.type.be1 = struct_value () [concrete] -// CHECK:STDOUT: %.681: type = fn_type_with_self_type %EqWith.WithSelf.NotEqual.type.ed4, %EqWith.facet [concrete] +// CHECK:STDOUT: %.681: type = fn_type_with_self_type %EqWith.WithSelf.NotEqual.type.ed4, %EqWith.facet.646 [concrete] // CHECK:STDOUT: %Cpp.long.as.EqWith.impl.NotEqual.type.35d: type = fn_type @Cpp.long.as.EqWith.impl.NotEqual.3 [concrete] // CHECK:STDOUT: %Cpp.long.as.EqWith.impl.NotEqual.cf9: %Cpp.long.as.EqWith.impl.NotEqual.type.35d = struct_value () [concrete] // CHECK:STDOUT: %OrderedWith.type.a39: type = facet_type <@OrderedWith, @OrderedWith(%Cpp.long)> [concrete] // CHECK:STDOUT: %OrderedWith.impl_witness.109: = impl_witness imports.%OrderedWith.impl_witness_table.a70 [concrete] -// CHECK:STDOUT: %OrderedWith.facet: %OrderedWith.type.a39 = facet_value %Cpp.long, (%OrderedWith.impl_witness.109) [concrete] -// CHECK:STDOUT: %OrderedWith.WithSelf.Less.type.2ac: type = fn_type @OrderedWith.WithSelf.Less, @OrderedWith.WithSelf(%Cpp.long, %OrderedWith.facet) [concrete] -// CHECK:STDOUT: %OrderedWith.WithSelf.LessOrEquivalent.type.653: type = fn_type @OrderedWith.WithSelf.LessOrEquivalent, @OrderedWith.WithSelf(%Cpp.long, %OrderedWith.facet) [concrete] -// CHECK:STDOUT: %OrderedWith.WithSelf.Greater.type.df9: type = fn_type @OrderedWith.WithSelf.Greater, @OrderedWith.WithSelf(%Cpp.long, %OrderedWith.facet) [concrete] -// CHECK:STDOUT: %OrderedWith.WithSelf.GreaterOrEquivalent.type.6f9: type = fn_type @OrderedWith.WithSelf.GreaterOrEquivalent, @OrderedWith.WithSelf(%Cpp.long, %OrderedWith.facet) [concrete] -// CHECK:STDOUT: %.49a: type = fn_type_with_self_type %OrderedWith.WithSelf.Greater.type.df9, %OrderedWith.facet [concrete] +// CHECK:STDOUT: %OrderedWith.facet.88a: %OrderedWith.type.a39 = facet_value %Cpp.long, (%OrderedWith.impl_witness.109) [concrete] +// CHECK:STDOUT: %OrderedWith.WithSelf.Less.type.2ac: type = fn_type @OrderedWith.WithSelf.Less, @OrderedWith.WithSelf(%Cpp.long, %OrderedWith.facet.88a) [concrete] +// CHECK:STDOUT: %OrderedWith.WithSelf.LessOrEquivalent.type.653: type = fn_type @OrderedWith.WithSelf.LessOrEquivalent, @OrderedWith.WithSelf(%Cpp.long, %OrderedWith.facet.88a) [concrete] +// CHECK:STDOUT: %OrderedWith.WithSelf.Greater.type.df9: type = fn_type @OrderedWith.WithSelf.Greater, @OrderedWith.WithSelf(%Cpp.long, %OrderedWith.facet.88a) [concrete] +// CHECK:STDOUT: %OrderedWith.WithSelf.GreaterOrEquivalent.type.6f9: type = fn_type @OrderedWith.WithSelf.GreaterOrEquivalent, @OrderedWith.WithSelf(%Cpp.long, %OrderedWith.facet.88a) [concrete] +// CHECK:STDOUT: %.49a: type = fn_type_with_self_type %OrderedWith.WithSelf.Greater.type.df9, %OrderedWith.facet.88a [concrete] // CHECK:STDOUT: %Cpp.long.as.OrderedWith.impl.Greater.type.9ce: type = fn_type @Cpp.long.as.OrderedWith.impl.Greater.3 [concrete] // CHECK:STDOUT: %Cpp.long.as.OrderedWith.impl.Greater.1b4: %Cpp.long.as.OrderedWith.impl.Greater.type.9ce = struct_value () [concrete] -// CHECK:STDOUT: %.1e2: type = fn_type_with_self_type %OrderedWith.WithSelf.Less.type.2ac, %OrderedWith.facet [concrete] +// CHECK:STDOUT: %.1e2: type = fn_type_with_self_type %OrderedWith.WithSelf.Less.type.2ac, %OrderedWith.facet.88a [concrete] // CHECK:STDOUT: %Cpp.long.as.OrderedWith.impl.Less.type.7ac: type = fn_type @Cpp.long.as.OrderedWith.impl.Less.3 [concrete] // CHECK:STDOUT: %Cpp.long.as.OrderedWith.impl.Less.4e6: %Cpp.long.as.OrderedWith.impl.Less.type.7ac = struct_value () [concrete] -// CHECK:STDOUT: %.eeb: type = fn_type_with_self_type %OrderedWith.WithSelf.GreaterOrEquivalent.type.6f9, %OrderedWith.facet [concrete] +// CHECK:STDOUT: %.eeb: type = fn_type_with_self_type %OrderedWith.WithSelf.GreaterOrEquivalent.type.6f9, %OrderedWith.facet.88a [concrete] // CHECK:STDOUT: %Cpp.long.as.OrderedWith.impl.GreaterOrEquivalent.type.237: type = fn_type @Cpp.long.as.OrderedWith.impl.GreaterOrEquivalent.3 [concrete] // CHECK:STDOUT: %Cpp.long.as.OrderedWith.impl.GreaterOrEquivalent.9de: %Cpp.long.as.OrderedWith.impl.GreaterOrEquivalent.type.237 = struct_value () [concrete] -// CHECK:STDOUT: %.770: type = fn_type_with_self_type %OrderedWith.WithSelf.LessOrEquivalent.type.653, %OrderedWith.facet [concrete] +// CHECK:STDOUT: %.770: type = fn_type_with_self_type %OrderedWith.WithSelf.LessOrEquivalent.type.653, %OrderedWith.facet.88a [concrete] // CHECK:STDOUT: %Cpp.long.as.OrderedWith.impl.LessOrEquivalent.type.945: type = fn_type @Cpp.long.as.OrderedWith.impl.LessOrEquivalent.3 [concrete] // CHECK:STDOUT: %Cpp.long.as.OrderedWith.impl.LessOrEquivalent.530: %Cpp.long.as.OrderedWith.impl.LessOrEquivalent.type.945 = struct_value () [concrete] // CHECK:STDOUT: } @@ -2497,37 +2497,37 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long.as.Negate.impl.Op: %Cpp.long.as.Negate.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %AddWith.type.9c2: type = facet_type <@AddWith, @AddWith(%Cpp.long)> [concrete] // CHECK:STDOUT: %AddWith.impl_witness.f2b: = impl_witness imports.%AddWith.impl_witness_table.819 [concrete] -// CHECK:STDOUT: %AddWith.facet: %AddWith.type.9c2 = facet_value %Cpp.long, (%AddWith.impl_witness.f2b) [concrete] -// CHECK:STDOUT: %AddWith.WithSelf.Op.type.c8c: type = fn_type @AddWith.WithSelf.Op, @AddWith.WithSelf(%Cpp.long, %AddWith.facet) [concrete] -// CHECK:STDOUT: %.a2a: type = fn_type_with_self_type %AddWith.WithSelf.Op.type.c8c, %AddWith.facet [concrete] +// CHECK:STDOUT: %AddWith.facet.1b4: %AddWith.type.9c2 = facet_value %Cpp.long, (%AddWith.impl_witness.f2b) [concrete] +// CHECK:STDOUT: %AddWith.WithSelf.Op.type.c8c: type = fn_type @AddWith.WithSelf.Op, @AddWith.WithSelf(%Cpp.long, %AddWith.facet.1b4) [concrete] +// CHECK:STDOUT: %.a2a: type = fn_type_with_self_type %AddWith.WithSelf.Op.type.c8c, %AddWith.facet.1b4 [concrete] // CHECK:STDOUT: %Cpp.long.as.AddWith.impl.Op.type.c8f: type = fn_type @Cpp.long.as.AddWith.impl.Op.3 [concrete] // CHECK:STDOUT: %Cpp.long.as.AddWith.impl.Op.c14: %Cpp.long.as.AddWith.impl.Op.type.c8f = struct_value () [concrete] // CHECK:STDOUT: %SubWith.type.e8e: type = facet_type <@SubWith, @SubWith(%Cpp.long)> [concrete] // CHECK:STDOUT: %SubWith.impl_witness.e35: = impl_witness imports.%SubWith.impl_witness_table.02b [concrete] -// CHECK:STDOUT: %SubWith.facet: %SubWith.type.e8e = facet_value %Cpp.long, (%SubWith.impl_witness.e35) [concrete] -// CHECK:STDOUT: %SubWith.WithSelf.Op.type.bfa: type = fn_type @SubWith.WithSelf.Op, @SubWith.WithSelf(%Cpp.long, %SubWith.facet) [concrete] -// CHECK:STDOUT: %.b47: type = fn_type_with_self_type %SubWith.WithSelf.Op.type.bfa, %SubWith.facet [concrete] +// CHECK:STDOUT: %SubWith.facet.f2b: %SubWith.type.e8e = facet_value %Cpp.long, (%SubWith.impl_witness.e35) [concrete] +// CHECK:STDOUT: %SubWith.WithSelf.Op.type.bfa: type = fn_type @SubWith.WithSelf.Op, @SubWith.WithSelf(%Cpp.long, %SubWith.facet.f2b) [concrete] +// CHECK:STDOUT: %.b47: type = fn_type_with_self_type %SubWith.WithSelf.Op.type.bfa, %SubWith.facet.f2b [concrete] // CHECK:STDOUT: %Cpp.long.as.SubWith.impl.Op.type.7d6: type = fn_type @Cpp.long.as.SubWith.impl.Op.3 [concrete] // CHECK:STDOUT: %Cpp.long.as.SubWith.impl.Op.f2a: %Cpp.long.as.SubWith.impl.Op.type.7d6 = struct_value () [concrete] // CHECK:STDOUT: %MulWith.type.a32: type = facet_type <@MulWith, @MulWith(%Cpp.long)> [concrete] // CHECK:STDOUT: %MulWith.impl_witness.7ce: = impl_witness imports.%MulWith.impl_witness_table.61f [concrete] -// CHECK:STDOUT: %MulWith.facet: %MulWith.type.a32 = facet_value %Cpp.long, (%MulWith.impl_witness.7ce) [concrete] -// CHECK:STDOUT: %MulWith.WithSelf.Op.type.7fe: type = fn_type @MulWith.WithSelf.Op, @MulWith.WithSelf(%Cpp.long, %MulWith.facet) [concrete] -// CHECK:STDOUT: %.b3f: type = fn_type_with_self_type %MulWith.WithSelf.Op.type.7fe, %MulWith.facet [concrete] +// CHECK:STDOUT: %MulWith.facet.b05: %MulWith.type.a32 = facet_value %Cpp.long, (%MulWith.impl_witness.7ce) [concrete] +// CHECK:STDOUT: %MulWith.WithSelf.Op.type.7fe: type = fn_type @MulWith.WithSelf.Op, @MulWith.WithSelf(%Cpp.long, %MulWith.facet.b05) [concrete] +// CHECK:STDOUT: %.b3f: type = fn_type_with_self_type %MulWith.WithSelf.Op.type.7fe, %MulWith.facet.b05 [concrete] // CHECK:STDOUT: %Cpp.long.as.MulWith.impl.Op.type.9a9: type = fn_type @Cpp.long.as.MulWith.impl.Op.3 [concrete] // CHECK:STDOUT: %Cpp.long.as.MulWith.impl.Op.f69: %Cpp.long.as.MulWith.impl.Op.type.9a9 = struct_value () [concrete] // CHECK:STDOUT: %DivWith.type.0c0: type = facet_type <@DivWith, @DivWith(%Cpp.long)> [concrete] // CHECK:STDOUT: %DivWith.impl_witness.8f1: = impl_witness imports.%DivWith.impl_witness_table.b92 [concrete] -// CHECK:STDOUT: %DivWith.facet: %DivWith.type.0c0 = facet_value %Cpp.long, (%DivWith.impl_witness.8f1) [concrete] -// CHECK:STDOUT: %DivWith.WithSelf.Op.type.542: type = fn_type @DivWith.WithSelf.Op, @DivWith.WithSelf(%Cpp.long, %DivWith.facet) [concrete] -// CHECK:STDOUT: %.88c: type = fn_type_with_self_type %DivWith.WithSelf.Op.type.542, %DivWith.facet [concrete] +// CHECK:STDOUT: %DivWith.facet.d2c: %DivWith.type.0c0 = facet_value %Cpp.long, (%DivWith.impl_witness.8f1) [concrete] +// CHECK:STDOUT: %DivWith.WithSelf.Op.type.542: type = fn_type @DivWith.WithSelf.Op, @DivWith.WithSelf(%Cpp.long, %DivWith.facet.d2c) [concrete] +// CHECK:STDOUT: %.88c: type = fn_type_with_self_type %DivWith.WithSelf.Op.type.542, %DivWith.facet.d2c [concrete] // CHECK:STDOUT: %Cpp.long.as.DivWith.impl.Op.type.adc: type = fn_type @Cpp.long.as.DivWith.impl.Op.3 [concrete] // CHECK:STDOUT: %Cpp.long.as.DivWith.impl.Op.9e1: %Cpp.long.as.DivWith.impl.Op.type.adc = struct_value () [concrete] // CHECK:STDOUT: %ModWith.type.2fc: type = facet_type <@ModWith, @ModWith(%Cpp.long)> [concrete] // CHECK:STDOUT: %ModWith.impl_witness.ad5: = impl_witness imports.%ModWith.impl_witness_table.578 [concrete] -// CHECK:STDOUT: %ModWith.facet: %ModWith.type.2fc = facet_value %Cpp.long, (%ModWith.impl_witness.ad5) [concrete] -// CHECK:STDOUT: %ModWith.WithSelf.Op.type.14d: type = fn_type @ModWith.WithSelf.Op, @ModWith.WithSelf(%Cpp.long, %ModWith.facet) [concrete] -// CHECK:STDOUT: %.ec5: type = fn_type_with_self_type %ModWith.WithSelf.Op.type.14d, %ModWith.facet [concrete] +// CHECK:STDOUT: %ModWith.facet.41b: %ModWith.type.2fc = facet_value %Cpp.long, (%ModWith.impl_witness.ad5) [concrete] +// CHECK:STDOUT: %ModWith.WithSelf.Op.type.14d: type = fn_type @ModWith.WithSelf.Op, @ModWith.WithSelf(%Cpp.long, %ModWith.facet.41b) [concrete] +// CHECK:STDOUT: %.ec5: type = fn_type_with_self_type %ModWith.WithSelf.Op.type.14d, %ModWith.facet.41b [concrete] // CHECK:STDOUT: %Cpp.long.as.ModWith.impl.Op.type.d7d: type = fn_type @Cpp.long.as.ModWith.impl.Op.3 [concrete] // CHECK:STDOUT: %Cpp.long.as.ModWith.impl.Op.922: %Cpp.long.as.ModWith.impl.Op.type.d7d = struct_value () [concrete] // CHECK:STDOUT: } @@ -2718,9 +2718,9 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long.as.AddAssignWith.impl.Op.ae60d1.1: %Cpp.long.as.AddAssignWith.impl.Op.type.74c6e5.1 = struct_value () [concrete] // CHECK:STDOUT: %Cpp.long.as.AddAssignWith.impl.Op.type.74c6e5.2: type = fn_type @Cpp.long.as.AddAssignWith.impl.Op.1, @Cpp.long.as.AddAssignWith.impl(%ImplicitAs.facet.293) [concrete] // CHECK:STDOUT: %Cpp.long.as.AddAssignWith.impl.Op.ae60d1.2: %Cpp.long.as.AddAssignWith.impl.Op.type.74c6e5.2 = struct_value () [concrete] -// CHECK:STDOUT: %AddAssignWith.facet: %AddAssignWith.type.bef = facet_value %Cpp.long, (%AddAssignWith.impl_witness.dfa) [concrete] -// CHECK:STDOUT: %AddAssignWith.WithSelf.Op.type.8b3: type = fn_type @AddAssignWith.WithSelf.Op, @AddAssignWith.WithSelf(%Cpp.long, %AddAssignWith.facet) [concrete] -// CHECK:STDOUT: %.152: type = fn_type_with_self_type %AddAssignWith.WithSelf.Op.type.8b3, %AddAssignWith.facet [concrete] +// CHECK:STDOUT: %AddAssignWith.facet.703: %AddAssignWith.type.bef = facet_value %Cpp.long, (%AddAssignWith.impl_witness.dfa) [concrete] +// CHECK:STDOUT: %AddAssignWith.WithSelf.Op.type.8b3: type = fn_type @AddAssignWith.WithSelf.Op, @AddAssignWith.WithSelf(%Cpp.long, %AddAssignWith.facet.703) [concrete] +// CHECK:STDOUT: %.152: type = fn_type_with_self_type %AddAssignWith.WithSelf.Op.type.8b3, %AddAssignWith.facet.703 [concrete] // CHECK:STDOUT: %Cpp.long.as.AddAssignWith.impl.Op.specific_fn.eef335.1: = specific_function %Cpp.long.as.AddAssignWith.impl.Op.ae60d1.2, @Cpp.long.as.AddAssignWith.impl.Op.1(%ImplicitAs.facet.293) [concrete] // CHECK:STDOUT: %Cpp.long.as.AddAssignWith.impl.Op.specific_fn.eef335.2: = specific_function %Cpp.long.as.AddAssignWith.impl.Op.ae60d1.1, @Cpp.long.as.AddAssignWith.impl.Op.2(%ImplicitAs.facet.293) [concrete] // CHECK:STDOUT: %SubAssignWith.type.b12: type = facet_type <@SubAssignWith, @SubAssignWith(%Cpp.long)> [concrete] @@ -2733,9 +2733,9 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long.as.SubAssignWith.impl.Op.fd6475.1: %Cpp.long.as.SubAssignWith.impl.Op.type.658f8e.1 = struct_value () [concrete] // CHECK:STDOUT: %Cpp.long.as.SubAssignWith.impl.Op.type.658f8e.2: type = fn_type @Cpp.long.as.SubAssignWith.impl.Op.1, @Cpp.long.as.SubAssignWith.impl(%ImplicitAs.facet.293) [concrete] // CHECK:STDOUT: %Cpp.long.as.SubAssignWith.impl.Op.fd6475.2: %Cpp.long.as.SubAssignWith.impl.Op.type.658f8e.2 = struct_value () [concrete] -// CHECK:STDOUT: %SubAssignWith.facet: %SubAssignWith.type.b12 = facet_value %Cpp.long, (%SubAssignWith.impl_witness.c70) [concrete] -// CHECK:STDOUT: %SubAssignWith.WithSelf.Op.type.ee9: type = fn_type @SubAssignWith.WithSelf.Op, @SubAssignWith.WithSelf(%Cpp.long, %SubAssignWith.facet) [concrete] -// CHECK:STDOUT: %.c23: type = fn_type_with_self_type %SubAssignWith.WithSelf.Op.type.ee9, %SubAssignWith.facet [concrete] +// CHECK:STDOUT: %SubAssignWith.facet.53d: %SubAssignWith.type.b12 = facet_value %Cpp.long, (%SubAssignWith.impl_witness.c70) [concrete] +// CHECK:STDOUT: %SubAssignWith.WithSelf.Op.type.ee9: type = fn_type @SubAssignWith.WithSelf.Op, @SubAssignWith.WithSelf(%Cpp.long, %SubAssignWith.facet.53d) [concrete] +// CHECK:STDOUT: %.c23: type = fn_type_with_self_type %SubAssignWith.WithSelf.Op.type.ee9, %SubAssignWith.facet.53d [concrete] // CHECK:STDOUT: %Cpp.long.as.SubAssignWith.impl.Op.specific_fn.74209d.1: = specific_function %Cpp.long.as.SubAssignWith.impl.Op.fd6475.2, @Cpp.long.as.SubAssignWith.impl.Op.1(%ImplicitAs.facet.293) [concrete] // CHECK:STDOUT: %Cpp.long.as.SubAssignWith.impl.Op.specific_fn.74209d.2: = specific_function %Cpp.long.as.SubAssignWith.impl.Op.fd6475.1, @Cpp.long.as.SubAssignWith.impl.Op.2(%ImplicitAs.facet.293) [concrete] // CHECK:STDOUT: %MulAssignWith.type.59a: type = facet_type <@MulAssignWith, @MulAssignWith(%Cpp.long)> [concrete] @@ -2748,9 +2748,9 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long.as.MulAssignWith.impl.Op.259df5.1: %Cpp.long.as.MulAssignWith.impl.Op.type.792c18.1 = struct_value () [concrete] // CHECK:STDOUT: %Cpp.long.as.MulAssignWith.impl.Op.type.792c18.2: type = fn_type @Cpp.long.as.MulAssignWith.impl.Op.1, @Cpp.long.as.MulAssignWith.impl(%ImplicitAs.facet.293) [concrete] // CHECK:STDOUT: %Cpp.long.as.MulAssignWith.impl.Op.259df5.2: %Cpp.long.as.MulAssignWith.impl.Op.type.792c18.2 = struct_value () [concrete] -// CHECK:STDOUT: %MulAssignWith.facet: %MulAssignWith.type.59a = facet_value %Cpp.long, (%MulAssignWith.impl_witness.7cb) [concrete] -// CHECK:STDOUT: %MulAssignWith.WithSelf.Op.type.13f: type = fn_type @MulAssignWith.WithSelf.Op, @MulAssignWith.WithSelf(%Cpp.long, %MulAssignWith.facet) [concrete] -// CHECK:STDOUT: %.24b: type = fn_type_with_self_type %MulAssignWith.WithSelf.Op.type.13f, %MulAssignWith.facet [concrete] +// CHECK:STDOUT: %MulAssignWith.facet.0bc: %MulAssignWith.type.59a = facet_value %Cpp.long, (%MulAssignWith.impl_witness.7cb) [concrete] +// CHECK:STDOUT: %MulAssignWith.WithSelf.Op.type.13f: type = fn_type @MulAssignWith.WithSelf.Op, @MulAssignWith.WithSelf(%Cpp.long, %MulAssignWith.facet.0bc) [concrete] +// CHECK:STDOUT: %.24b: type = fn_type_with_self_type %MulAssignWith.WithSelf.Op.type.13f, %MulAssignWith.facet.0bc [concrete] // CHECK:STDOUT: %Cpp.long.as.MulAssignWith.impl.Op.specific_fn.7330e2.1: = specific_function %Cpp.long.as.MulAssignWith.impl.Op.259df5.2, @Cpp.long.as.MulAssignWith.impl.Op.1(%ImplicitAs.facet.293) [concrete] // CHECK:STDOUT: %Cpp.long.as.MulAssignWith.impl.Op.specific_fn.7330e2.2: = specific_function %Cpp.long.as.MulAssignWith.impl.Op.259df5.1, @Cpp.long.as.MulAssignWith.impl.Op.2(%ImplicitAs.facet.293) [concrete] // CHECK:STDOUT: %DivAssignWith.type.e6d: type = facet_type <@DivAssignWith, @DivAssignWith(%Cpp.long)> [concrete] @@ -2763,9 +2763,9 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long.as.DivAssignWith.impl.Op.42cd1a.1: %Cpp.long.as.DivAssignWith.impl.Op.type.524341.1 = struct_value () [concrete] // CHECK:STDOUT: %Cpp.long.as.DivAssignWith.impl.Op.type.524341.2: type = fn_type @Cpp.long.as.DivAssignWith.impl.Op.1, @Cpp.long.as.DivAssignWith.impl(%ImplicitAs.facet.293) [concrete] // CHECK:STDOUT: %Cpp.long.as.DivAssignWith.impl.Op.42cd1a.2: %Cpp.long.as.DivAssignWith.impl.Op.type.524341.2 = struct_value () [concrete] -// CHECK:STDOUT: %DivAssignWith.facet: %DivAssignWith.type.e6d = facet_value %Cpp.long, (%DivAssignWith.impl_witness.376) [concrete] -// CHECK:STDOUT: %DivAssignWith.WithSelf.Op.type.220: type = fn_type @DivAssignWith.WithSelf.Op, @DivAssignWith.WithSelf(%Cpp.long, %DivAssignWith.facet) [concrete] -// CHECK:STDOUT: %.2e9: type = fn_type_with_self_type %DivAssignWith.WithSelf.Op.type.220, %DivAssignWith.facet [concrete] +// CHECK:STDOUT: %DivAssignWith.facet.cd1: %DivAssignWith.type.e6d = facet_value %Cpp.long, (%DivAssignWith.impl_witness.376) [concrete] +// CHECK:STDOUT: %DivAssignWith.WithSelf.Op.type.220: type = fn_type @DivAssignWith.WithSelf.Op, @DivAssignWith.WithSelf(%Cpp.long, %DivAssignWith.facet.cd1) [concrete] +// CHECK:STDOUT: %.2e9: type = fn_type_with_self_type %DivAssignWith.WithSelf.Op.type.220, %DivAssignWith.facet.cd1 [concrete] // CHECK:STDOUT: %Cpp.long.as.DivAssignWith.impl.Op.specific_fn.480d87.1: = specific_function %Cpp.long.as.DivAssignWith.impl.Op.42cd1a.2, @Cpp.long.as.DivAssignWith.impl.Op.1(%ImplicitAs.facet.293) [concrete] // CHECK:STDOUT: %Cpp.long.as.DivAssignWith.impl.Op.specific_fn.480d87.2: = specific_function %Cpp.long.as.DivAssignWith.impl.Op.42cd1a.1, @Cpp.long.as.DivAssignWith.impl.Op.2(%ImplicitAs.facet.293) [concrete] // CHECK:STDOUT: %ModAssignWith.type.2a3: type = facet_type <@ModAssignWith, @ModAssignWith(%Cpp.long)> [concrete] @@ -2778,9 +2778,9 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long.as.ModAssignWith.impl.Op.181cf2.1: %Cpp.long.as.ModAssignWith.impl.Op.type.5216aa.1 = struct_value () [concrete] // CHECK:STDOUT: %Cpp.long.as.ModAssignWith.impl.Op.type.5216aa.2: type = fn_type @Cpp.long.as.ModAssignWith.impl.Op.1, @Cpp.long.as.ModAssignWith.impl(%ImplicitAs.facet.293) [concrete] // CHECK:STDOUT: %Cpp.long.as.ModAssignWith.impl.Op.181cf2.2: %Cpp.long.as.ModAssignWith.impl.Op.type.5216aa.2 = struct_value () [concrete] -// CHECK:STDOUT: %ModAssignWith.facet: %ModAssignWith.type.2a3 = facet_value %Cpp.long, (%ModAssignWith.impl_witness.474) [concrete] -// CHECK:STDOUT: %ModAssignWith.WithSelf.Op.type.66a: type = fn_type @ModAssignWith.WithSelf.Op, @ModAssignWith.WithSelf(%Cpp.long, %ModAssignWith.facet) [concrete] -// CHECK:STDOUT: %.b99: type = fn_type_with_self_type %ModAssignWith.WithSelf.Op.type.66a, %ModAssignWith.facet [concrete] +// CHECK:STDOUT: %ModAssignWith.facet.8ef: %ModAssignWith.type.2a3 = facet_value %Cpp.long, (%ModAssignWith.impl_witness.474) [concrete] +// CHECK:STDOUT: %ModAssignWith.WithSelf.Op.type.66a: type = fn_type @ModAssignWith.WithSelf.Op, @ModAssignWith.WithSelf(%Cpp.long, %ModAssignWith.facet.8ef) [concrete] +// CHECK:STDOUT: %.b99: type = fn_type_with_self_type %ModAssignWith.WithSelf.Op.type.66a, %ModAssignWith.facet.8ef [concrete] // CHECK:STDOUT: %Cpp.long.as.ModAssignWith.impl.Op.specific_fn.d85655.1: = specific_function %Cpp.long.as.ModAssignWith.impl.Op.181cf2.2, @Cpp.long.as.ModAssignWith.impl.Op.1(%ImplicitAs.facet.293) [concrete] // CHECK:STDOUT: %Cpp.long.as.ModAssignWith.impl.Op.specific_fn.d85655.2: = specific_function %Cpp.long.as.ModAssignWith.impl.Op.181cf2.1, @Cpp.long.as.ModAssignWith.impl.Op.2(%ImplicitAs.facet.293) [concrete] // CHECK:STDOUT: %BitAndAssignWith.type.efd: type = facet_type <@BitAndAssignWith, @BitAndAssignWith(%Cpp.long)> [concrete] @@ -2793,9 +2793,9 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long.as.BitAndAssignWith.impl.Op.1f3e29.1: %Cpp.long.as.BitAndAssignWith.impl.Op.type.b86dd6.1 = struct_value () [concrete] // CHECK:STDOUT: %Cpp.long.as.BitAndAssignWith.impl.Op.type.b86dd6.2: type = fn_type @Cpp.long.as.BitAndAssignWith.impl.Op.1, @Cpp.long.as.BitAndAssignWith.impl(%ImplicitAs.facet.293) [concrete] // CHECK:STDOUT: %Cpp.long.as.BitAndAssignWith.impl.Op.1f3e29.2: %Cpp.long.as.BitAndAssignWith.impl.Op.type.b86dd6.2 = struct_value () [concrete] -// CHECK:STDOUT: %BitAndAssignWith.facet: %BitAndAssignWith.type.efd = facet_value %Cpp.long, (%BitAndAssignWith.impl_witness.b09) [concrete] -// CHECK:STDOUT: %BitAndAssignWith.WithSelf.Op.type.e5c: type = fn_type @BitAndAssignWith.WithSelf.Op, @BitAndAssignWith.WithSelf(%Cpp.long, %BitAndAssignWith.facet) [concrete] -// CHECK:STDOUT: %.55a: type = fn_type_with_self_type %BitAndAssignWith.WithSelf.Op.type.e5c, %BitAndAssignWith.facet [concrete] +// CHECK:STDOUT: %BitAndAssignWith.facet.6d2: %BitAndAssignWith.type.efd = facet_value %Cpp.long, (%BitAndAssignWith.impl_witness.b09) [concrete] +// CHECK:STDOUT: %BitAndAssignWith.WithSelf.Op.type.e5c: type = fn_type @BitAndAssignWith.WithSelf.Op, @BitAndAssignWith.WithSelf(%Cpp.long, %BitAndAssignWith.facet.6d2) [concrete] +// CHECK:STDOUT: %.55a: type = fn_type_with_self_type %BitAndAssignWith.WithSelf.Op.type.e5c, %BitAndAssignWith.facet.6d2 [concrete] // CHECK:STDOUT: %Cpp.long.as.BitAndAssignWith.impl.Op.specific_fn.32ba3e.1: = specific_function %Cpp.long.as.BitAndAssignWith.impl.Op.1f3e29.2, @Cpp.long.as.BitAndAssignWith.impl.Op.1(%ImplicitAs.facet.293) [concrete] // CHECK:STDOUT: %Cpp.long.as.BitAndAssignWith.impl.Op.specific_fn.32ba3e.2: = specific_function %Cpp.long.as.BitAndAssignWith.impl.Op.1f3e29.1, @Cpp.long.as.BitAndAssignWith.impl.Op.2(%ImplicitAs.facet.293) [concrete] // CHECK:STDOUT: %BitOrAssignWith.type.b27: type = facet_type <@BitOrAssignWith, @BitOrAssignWith(%Cpp.long)> [concrete] @@ -2808,9 +2808,9 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long.as.BitOrAssignWith.impl.Op.e40cb6.1: %Cpp.long.as.BitOrAssignWith.impl.Op.type.f6ba26.1 = struct_value () [concrete] // CHECK:STDOUT: %Cpp.long.as.BitOrAssignWith.impl.Op.type.f6ba26.2: type = fn_type @Cpp.long.as.BitOrAssignWith.impl.Op.1, @Cpp.long.as.BitOrAssignWith.impl(%ImplicitAs.facet.293) [concrete] // CHECK:STDOUT: %Cpp.long.as.BitOrAssignWith.impl.Op.e40cb6.2: %Cpp.long.as.BitOrAssignWith.impl.Op.type.f6ba26.2 = struct_value () [concrete] -// CHECK:STDOUT: %BitOrAssignWith.facet: %BitOrAssignWith.type.b27 = facet_value %Cpp.long, (%BitOrAssignWith.impl_witness.942) [concrete] -// CHECK:STDOUT: %BitOrAssignWith.WithSelf.Op.type.45b: type = fn_type @BitOrAssignWith.WithSelf.Op, @BitOrAssignWith.WithSelf(%Cpp.long, %BitOrAssignWith.facet) [concrete] -// CHECK:STDOUT: %.c11: type = fn_type_with_self_type %BitOrAssignWith.WithSelf.Op.type.45b, %BitOrAssignWith.facet [concrete] +// CHECK:STDOUT: %BitOrAssignWith.facet.09c: %BitOrAssignWith.type.b27 = facet_value %Cpp.long, (%BitOrAssignWith.impl_witness.942) [concrete] +// CHECK:STDOUT: %BitOrAssignWith.WithSelf.Op.type.45b: type = fn_type @BitOrAssignWith.WithSelf.Op, @BitOrAssignWith.WithSelf(%Cpp.long, %BitOrAssignWith.facet.09c) [concrete] +// CHECK:STDOUT: %.c11: type = fn_type_with_self_type %BitOrAssignWith.WithSelf.Op.type.45b, %BitOrAssignWith.facet.09c [concrete] // CHECK:STDOUT: %Cpp.long.as.BitOrAssignWith.impl.Op.specific_fn.de0818.1: = specific_function %Cpp.long.as.BitOrAssignWith.impl.Op.e40cb6.2, @Cpp.long.as.BitOrAssignWith.impl.Op.1(%ImplicitAs.facet.293) [concrete] // CHECK:STDOUT: %Cpp.long.as.BitOrAssignWith.impl.Op.specific_fn.de0818.2: = specific_function %Cpp.long.as.BitOrAssignWith.impl.Op.e40cb6.1, @Cpp.long.as.BitOrAssignWith.impl.Op.2(%ImplicitAs.facet.293) [concrete] // CHECK:STDOUT: %BitXorAssignWith.type.431: type = facet_type <@BitXorAssignWith, @BitXorAssignWith(%Cpp.long)> [concrete] @@ -2823,9 +2823,9 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long.as.BitXorAssignWith.impl.Op.db4335.1: %Cpp.long.as.BitXorAssignWith.impl.Op.type.5d3edc.1 = struct_value () [concrete] // CHECK:STDOUT: %Cpp.long.as.BitXorAssignWith.impl.Op.type.5d3edc.2: type = fn_type @Cpp.long.as.BitXorAssignWith.impl.Op.1, @Cpp.long.as.BitXorAssignWith.impl(%ImplicitAs.facet.293) [concrete] // CHECK:STDOUT: %Cpp.long.as.BitXorAssignWith.impl.Op.db4335.2: %Cpp.long.as.BitXorAssignWith.impl.Op.type.5d3edc.2 = struct_value () [concrete] -// CHECK:STDOUT: %BitXorAssignWith.facet: %BitXorAssignWith.type.431 = facet_value %Cpp.long, (%BitXorAssignWith.impl_witness.12c) [concrete] -// CHECK:STDOUT: %BitXorAssignWith.WithSelf.Op.type.ce9: type = fn_type @BitXorAssignWith.WithSelf.Op, @BitXorAssignWith.WithSelf(%Cpp.long, %BitXorAssignWith.facet) [concrete] -// CHECK:STDOUT: %.99b: type = fn_type_with_self_type %BitXorAssignWith.WithSelf.Op.type.ce9, %BitXorAssignWith.facet [concrete] +// CHECK:STDOUT: %BitXorAssignWith.facet.0ad: %BitXorAssignWith.type.431 = facet_value %Cpp.long, (%BitXorAssignWith.impl_witness.12c) [concrete] +// CHECK:STDOUT: %BitXorAssignWith.WithSelf.Op.type.ce9: type = fn_type @BitXorAssignWith.WithSelf.Op, @BitXorAssignWith.WithSelf(%Cpp.long, %BitXorAssignWith.facet.0ad) [concrete] +// CHECK:STDOUT: %.99b: type = fn_type_with_self_type %BitXorAssignWith.WithSelf.Op.type.ce9, %BitXorAssignWith.facet.0ad [concrete] // CHECK:STDOUT: %Cpp.long.as.BitXorAssignWith.impl.Op.specific_fn.49f737.1: = specific_function %Cpp.long.as.BitXorAssignWith.impl.Op.db4335.2, @Cpp.long.as.BitXorAssignWith.impl.Op.1(%ImplicitAs.facet.293) [concrete] // CHECK:STDOUT: %Cpp.long.as.BitXorAssignWith.impl.Op.specific_fn.49f737.2: = specific_function %Cpp.long.as.BitXorAssignWith.impl.Op.db4335.1, @Cpp.long.as.BitXorAssignWith.impl.Op.2(%ImplicitAs.facet.293) [concrete] // CHECK:STDOUT: %LeftShiftAssignWith.type.bed: type = facet_type <@LeftShiftAssignWith, @LeftShiftAssignWith(%Cpp.long)> [concrete] @@ -2838,9 +2838,9 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long.as.LeftShiftAssignWith.impl.Op.4c9810.1: %Cpp.long.as.LeftShiftAssignWith.impl.Op.type.42094d.1 = struct_value () [concrete] // CHECK:STDOUT: %Cpp.long.as.LeftShiftAssignWith.impl.Op.type.42094d.2: type = fn_type @Cpp.long.as.LeftShiftAssignWith.impl.Op.1, @Cpp.long.as.LeftShiftAssignWith.impl(%ImplicitAs.facet.293) [concrete] // CHECK:STDOUT: %Cpp.long.as.LeftShiftAssignWith.impl.Op.4c9810.2: %Cpp.long.as.LeftShiftAssignWith.impl.Op.type.42094d.2 = struct_value () [concrete] -// CHECK:STDOUT: %LeftShiftAssignWith.facet: %LeftShiftAssignWith.type.bed = facet_value %Cpp.long, (%LeftShiftAssignWith.impl_witness.d7c) [concrete] -// CHECK:STDOUT: %LeftShiftAssignWith.WithSelf.Op.type.717: type = fn_type @LeftShiftAssignWith.WithSelf.Op, @LeftShiftAssignWith.WithSelf(%Cpp.long, %LeftShiftAssignWith.facet) [concrete] -// CHECK:STDOUT: %.250: type = fn_type_with_self_type %LeftShiftAssignWith.WithSelf.Op.type.717, %LeftShiftAssignWith.facet [concrete] +// CHECK:STDOUT: %LeftShiftAssignWith.facet.73c: %LeftShiftAssignWith.type.bed = facet_value %Cpp.long, (%LeftShiftAssignWith.impl_witness.d7c) [concrete] +// CHECK:STDOUT: %LeftShiftAssignWith.WithSelf.Op.type.717: type = fn_type @LeftShiftAssignWith.WithSelf.Op, @LeftShiftAssignWith.WithSelf(%Cpp.long, %LeftShiftAssignWith.facet.73c) [concrete] +// CHECK:STDOUT: %.250: type = fn_type_with_self_type %LeftShiftAssignWith.WithSelf.Op.type.717, %LeftShiftAssignWith.facet.73c [concrete] // CHECK:STDOUT: %Cpp.long.as.LeftShiftAssignWith.impl.Op.specific_fn.de5061.1: = specific_function %Cpp.long.as.LeftShiftAssignWith.impl.Op.4c9810.2, @Cpp.long.as.LeftShiftAssignWith.impl.Op.1(%ImplicitAs.facet.293) [concrete] // CHECK:STDOUT: %Cpp.long.as.LeftShiftAssignWith.impl.Op.specific_fn.de5061.2: = specific_function %Cpp.long.as.LeftShiftAssignWith.impl.Op.4c9810.1, @Cpp.long.as.LeftShiftAssignWith.impl.Op.2(%ImplicitAs.facet.293) [concrete] // CHECK:STDOUT: %RightShiftAssignWith.type.222: type = facet_type <@RightShiftAssignWith, @RightShiftAssignWith(%Cpp.long)> [concrete] @@ -2853,9 +2853,9 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long.as.RightShiftAssignWith.impl.Op.d597c8.1: %Cpp.long.as.RightShiftAssignWith.impl.Op.type.7121dc.1 = struct_value () [concrete] // CHECK:STDOUT: %Cpp.long.as.RightShiftAssignWith.impl.Op.type.7121dc.2: type = fn_type @Cpp.long.as.RightShiftAssignWith.impl.Op.1, @Cpp.long.as.RightShiftAssignWith.impl(%ImplicitAs.facet.293) [concrete] // CHECK:STDOUT: %Cpp.long.as.RightShiftAssignWith.impl.Op.d597c8.2: %Cpp.long.as.RightShiftAssignWith.impl.Op.type.7121dc.2 = struct_value () [concrete] -// CHECK:STDOUT: %RightShiftAssignWith.facet: %RightShiftAssignWith.type.222 = facet_value %Cpp.long, (%RightShiftAssignWith.impl_witness.44b) [concrete] -// CHECK:STDOUT: %RightShiftAssignWith.WithSelf.Op.type.302: type = fn_type @RightShiftAssignWith.WithSelf.Op, @RightShiftAssignWith.WithSelf(%Cpp.long, %RightShiftAssignWith.facet) [concrete] -// CHECK:STDOUT: %.988: type = fn_type_with_self_type %RightShiftAssignWith.WithSelf.Op.type.302, %RightShiftAssignWith.facet [concrete] +// CHECK:STDOUT: %RightShiftAssignWith.facet.a87: %RightShiftAssignWith.type.222 = facet_value %Cpp.long, (%RightShiftAssignWith.impl_witness.44b) [concrete] +// CHECK:STDOUT: %RightShiftAssignWith.WithSelf.Op.type.302: type = fn_type @RightShiftAssignWith.WithSelf.Op, @RightShiftAssignWith.WithSelf(%Cpp.long, %RightShiftAssignWith.facet.a87) [concrete] +// CHECK:STDOUT: %.988: type = fn_type_with_self_type %RightShiftAssignWith.WithSelf.Op.type.302, %RightShiftAssignWith.facet.a87 [concrete] // CHECK:STDOUT: %Cpp.long.as.RightShiftAssignWith.impl.Op.specific_fn.71fc11.1: = specific_function %Cpp.long.as.RightShiftAssignWith.impl.Op.d597c8.2, @Cpp.long.as.RightShiftAssignWith.impl.Op.1(%ImplicitAs.facet.293) [concrete] // CHECK:STDOUT: %Cpp.long.as.RightShiftAssignWith.impl.Op.specific_fn.71fc11.2: = specific_function %Cpp.long.as.RightShiftAssignWith.impl.Op.d597c8.1, @Cpp.long.as.RightShiftAssignWith.impl.Op.2(%ImplicitAs.facet.293) [concrete] // CHECK:STDOUT: %Destroy.Op.type.bae255.2: type = fn_type @Destroy.Op.loc9_3.2 [concrete] @@ -3137,9 +3137,9 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long.as.AddAssignWith.impl.Op.18480a.1: %Cpp.long.as.AddAssignWith.impl.Op.type.88b7ef.1 = struct_value () [concrete] // CHECK:STDOUT: %Cpp.long.as.AddAssignWith.impl.Op.type.88b7ef.2: type = fn_type @Cpp.long.as.AddAssignWith.impl.Op.1, @Cpp.long.as.AddAssignWith.impl(%ImplicitAs.facet.87f) [concrete] // CHECK:STDOUT: %Cpp.long.as.AddAssignWith.impl.Op.18480a.2: %Cpp.long.as.AddAssignWith.impl.Op.type.88b7ef.2 = struct_value () [concrete] -// CHECK:STDOUT: %AddAssignWith.facet: %AddAssignWith.type.794 = facet_value %Cpp.long, (%AddAssignWith.impl_witness.8a4) [concrete] -// CHECK:STDOUT: %AddAssignWith.WithSelf.Op.type.7e7: type = fn_type @AddAssignWith.WithSelf.Op, @AddAssignWith.WithSelf(%i32, %AddAssignWith.facet) [concrete] -// CHECK:STDOUT: %.3bf: type = fn_type_with_self_type %AddAssignWith.WithSelf.Op.type.7e7, %AddAssignWith.facet [concrete] +// CHECK:STDOUT: %AddAssignWith.facet.a4a: %AddAssignWith.type.794 = facet_value %Cpp.long, (%AddAssignWith.impl_witness.8a4) [concrete] +// CHECK:STDOUT: %AddAssignWith.WithSelf.Op.type.7e7: type = fn_type @AddAssignWith.WithSelf.Op, @AddAssignWith.WithSelf(%i32, %AddAssignWith.facet.a4a) [concrete] +// CHECK:STDOUT: %.3bf: type = fn_type_with_self_type %AddAssignWith.WithSelf.Op.type.7e7, %AddAssignWith.facet.a4a [concrete] // CHECK:STDOUT: %Cpp.long.as.AddAssignWith.impl.Op.specific_fn.c51759.1: = specific_function %Cpp.long.as.AddAssignWith.impl.Op.18480a.2, @Cpp.long.as.AddAssignWith.impl.Op.1(%ImplicitAs.facet.87f) [concrete] // CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.595: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs.WithSelf(%Cpp.long, %ImplicitAs.facet.87f) [concrete] // CHECK:STDOUT: %.d59: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.595, %ImplicitAs.facet.87f [concrete] @@ -3156,9 +3156,9 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long.as.SubAssignWith.impl.Op.3151e9.1: %Cpp.long.as.SubAssignWith.impl.Op.type.007151.1 = struct_value () [concrete] // CHECK:STDOUT: %Cpp.long.as.SubAssignWith.impl.Op.type.007151.2: type = fn_type @Cpp.long.as.SubAssignWith.impl.Op.1, @Cpp.long.as.SubAssignWith.impl(%ImplicitAs.facet.87f) [concrete] // CHECK:STDOUT: %Cpp.long.as.SubAssignWith.impl.Op.3151e9.2: %Cpp.long.as.SubAssignWith.impl.Op.type.007151.2 = struct_value () [concrete] -// CHECK:STDOUT: %SubAssignWith.facet: %SubAssignWith.type.ab0 = facet_value %Cpp.long, (%SubAssignWith.impl_witness.cde) [concrete] -// CHECK:STDOUT: %SubAssignWith.WithSelf.Op.type.b30: type = fn_type @SubAssignWith.WithSelf.Op, @SubAssignWith.WithSelf(%i32, %SubAssignWith.facet) [concrete] -// CHECK:STDOUT: %.0e9: type = fn_type_with_self_type %SubAssignWith.WithSelf.Op.type.b30, %SubAssignWith.facet [concrete] +// CHECK:STDOUT: %SubAssignWith.facet.0b8: %SubAssignWith.type.ab0 = facet_value %Cpp.long, (%SubAssignWith.impl_witness.cde) [concrete] +// CHECK:STDOUT: %SubAssignWith.WithSelf.Op.type.b30: type = fn_type @SubAssignWith.WithSelf.Op, @SubAssignWith.WithSelf(%i32, %SubAssignWith.facet.0b8) [concrete] +// CHECK:STDOUT: %.0e9: type = fn_type_with_self_type %SubAssignWith.WithSelf.Op.type.b30, %SubAssignWith.facet.0b8 [concrete] // CHECK:STDOUT: %Cpp.long.as.SubAssignWith.impl.Op.specific_fn.f4a251.1: = specific_function %Cpp.long.as.SubAssignWith.impl.Op.3151e9.2, @Cpp.long.as.SubAssignWith.impl.Op.1(%ImplicitAs.facet.87f) [concrete] // CHECK:STDOUT: %Cpp.long.as.SubAssignWith.impl.Op.specific_fn.f4a251.2: = specific_function %Cpp.long.as.SubAssignWith.impl.Op.3151e9.1, @Cpp.long.as.SubAssignWith.impl.Op.2(%ImplicitAs.facet.87f) [concrete] // CHECK:STDOUT: %MulAssignWith.type.743: type = facet_type <@MulAssignWith, @MulAssignWith(%i32)> [concrete] @@ -3171,9 +3171,9 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long.as.MulAssignWith.impl.Op.3df17e.1: %Cpp.long.as.MulAssignWith.impl.Op.type.249066.1 = struct_value () [concrete] // CHECK:STDOUT: %Cpp.long.as.MulAssignWith.impl.Op.type.249066.2: type = fn_type @Cpp.long.as.MulAssignWith.impl.Op.1, @Cpp.long.as.MulAssignWith.impl(%ImplicitAs.facet.87f) [concrete] // CHECK:STDOUT: %Cpp.long.as.MulAssignWith.impl.Op.3df17e.2: %Cpp.long.as.MulAssignWith.impl.Op.type.249066.2 = struct_value () [concrete] -// CHECK:STDOUT: %MulAssignWith.facet: %MulAssignWith.type.743 = facet_value %Cpp.long, (%MulAssignWith.impl_witness.10f) [concrete] -// CHECK:STDOUT: %MulAssignWith.WithSelf.Op.type.bff: type = fn_type @MulAssignWith.WithSelf.Op, @MulAssignWith.WithSelf(%i32, %MulAssignWith.facet) [concrete] -// CHECK:STDOUT: %.761: type = fn_type_with_self_type %MulAssignWith.WithSelf.Op.type.bff, %MulAssignWith.facet [concrete] +// CHECK:STDOUT: %MulAssignWith.facet.1bb: %MulAssignWith.type.743 = facet_value %Cpp.long, (%MulAssignWith.impl_witness.10f) [concrete] +// CHECK:STDOUT: %MulAssignWith.WithSelf.Op.type.bff: type = fn_type @MulAssignWith.WithSelf.Op, @MulAssignWith.WithSelf(%i32, %MulAssignWith.facet.1bb) [concrete] +// CHECK:STDOUT: %.761: type = fn_type_with_self_type %MulAssignWith.WithSelf.Op.type.bff, %MulAssignWith.facet.1bb [concrete] // CHECK:STDOUT: %Cpp.long.as.MulAssignWith.impl.Op.specific_fn.2a0ec5.1: = specific_function %Cpp.long.as.MulAssignWith.impl.Op.3df17e.2, @Cpp.long.as.MulAssignWith.impl.Op.1(%ImplicitAs.facet.87f) [concrete] // CHECK:STDOUT: %Cpp.long.as.MulAssignWith.impl.Op.specific_fn.2a0ec5.2: = specific_function %Cpp.long.as.MulAssignWith.impl.Op.3df17e.1, @Cpp.long.as.MulAssignWith.impl.Op.2(%ImplicitAs.facet.87f) [concrete] // CHECK:STDOUT: %DivAssignWith.type.786: type = facet_type <@DivAssignWith, @DivAssignWith(%i32)> [concrete] @@ -3186,9 +3186,9 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long.as.DivAssignWith.impl.Op.95c3cb.1: %Cpp.long.as.DivAssignWith.impl.Op.type.f3a6e1.1 = struct_value () [concrete] // CHECK:STDOUT: %Cpp.long.as.DivAssignWith.impl.Op.type.f3a6e1.2: type = fn_type @Cpp.long.as.DivAssignWith.impl.Op.1, @Cpp.long.as.DivAssignWith.impl(%ImplicitAs.facet.87f) [concrete] // CHECK:STDOUT: %Cpp.long.as.DivAssignWith.impl.Op.95c3cb.2: %Cpp.long.as.DivAssignWith.impl.Op.type.f3a6e1.2 = struct_value () [concrete] -// CHECK:STDOUT: %DivAssignWith.facet: %DivAssignWith.type.786 = facet_value %Cpp.long, (%DivAssignWith.impl_witness.0ea) [concrete] -// CHECK:STDOUT: %DivAssignWith.WithSelf.Op.type.99d: type = fn_type @DivAssignWith.WithSelf.Op, @DivAssignWith.WithSelf(%i32, %DivAssignWith.facet) [concrete] -// CHECK:STDOUT: %.d78: type = fn_type_with_self_type %DivAssignWith.WithSelf.Op.type.99d, %DivAssignWith.facet [concrete] +// CHECK:STDOUT: %DivAssignWith.facet.ae3: %DivAssignWith.type.786 = facet_value %Cpp.long, (%DivAssignWith.impl_witness.0ea) [concrete] +// CHECK:STDOUT: %DivAssignWith.WithSelf.Op.type.99d: type = fn_type @DivAssignWith.WithSelf.Op, @DivAssignWith.WithSelf(%i32, %DivAssignWith.facet.ae3) [concrete] +// CHECK:STDOUT: %.d78: type = fn_type_with_self_type %DivAssignWith.WithSelf.Op.type.99d, %DivAssignWith.facet.ae3 [concrete] // CHECK:STDOUT: %Cpp.long.as.DivAssignWith.impl.Op.specific_fn.63c0e6.1: = specific_function %Cpp.long.as.DivAssignWith.impl.Op.95c3cb.2, @Cpp.long.as.DivAssignWith.impl.Op.1(%ImplicitAs.facet.87f) [concrete] // CHECK:STDOUT: %Cpp.long.as.DivAssignWith.impl.Op.specific_fn.63c0e6.2: = specific_function %Cpp.long.as.DivAssignWith.impl.Op.95c3cb.1, @Cpp.long.as.DivAssignWith.impl.Op.2(%ImplicitAs.facet.87f) [concrete] // CHECK:STDOUT: %ModAssignWith.type.e49: type = facet_type <@ModAssignWith, @ModAssignWith(%i32)> [concrete] @@ -3201,9 +3201,9 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long.as.ModAssignWith.impl.Op.a5ea74.1: %Cpp.long.as.ModAssignWith.impl.Op.type.1dde31.1 = struct_value () [concrete] // CHECK:STDOUT: %Cpp.long.as.ModAssignWith.impl.Op.type.1dde31.2: type = fn_type @Cpp.long.as.ModAssignWith.impl.Op.1, @Cpp.long.as.ModAssignWith.impl(%ImplicitAs.facet.87f) [concrete] // CHECK:STDOUT: %Cpp.long.as.ModAssignWith.impl.Op.a5ea74.2: %Cpp.long.as.ModAssignWith.impl.Op.type.1dde31.2 = struct_value () [concrete] -// CHECK:STDOUT: %ModAssignWith.facet: %ModAssignWith.type.e49 = facet_value %Cpp.long, (%ModAssignWith.impl_witness.b4e) [concrete] -// CHECK:STDOUT: %ModAssignWith.WithSelf.Op.type.cae: type = fn_type @ModAssignWith.WithSelf.Op, @ModAssignWith.WithSelf(%i32, %ModAssignWith.facet) [concrete] -// CHECK:STDOUT: %.7f1: type = fn_type_with_self_type %ModAssignWith.WithSelf.Op.type.cae, %ModAssignWith.facet [concrete] +// CHECK:STDOUT: %ModAssignWith.facet.3d8: %ModAssignWith.type.e49 = facet_value %Cpp.long, (%ModAssignWith.impl_witness.b4e) [concrete] +// CHECK:STDOUT: %ModAssignWith.WithSelf.Op.type.cae: type = fn_type @ModAssignWith.WithSelf.Op, @ModAssignWith.WithSelf(%i32, %ModAssignWith.facet.3d8) [concrete] +// CHECK:STDOUT: %.7f1: type = fn_type_with_self_type %ModAssignWith.WithSelf.Op.type.cae, %ModAssignWith.facet.3d8 [concrete] // CHECK:STDOUT: %Cpp.long.as.ModAssignWith.impl.Op.specific_fn.1bddd2.1: = specific_function %Cpp.long.as.ModAssignWith.impl.Op.a5ea74.2, @Cpp.long.as.ModAssignWith.impl.Op.1(%ImplicitAs.facet.87f) [concrete] // CHECK:STDOUT: %Cpp.long.as.ModAssignWith.impl.Op.specific_fn.1bddd2.2: = specific_function %Cpp.long.as.ModAssignWith.impl.Op.a5ea74.1, @Cpp.long.as.ModAssignWith.impl.Op.2(%ImplicitAs.facet.87f) [concrete] // CHECK:STDOUT: %BitAndAssignWith.type.d65: type = facet_type <@BitAndAssignWith, @BitAndAssignWith(%i32)> [concrete] @@ -3216,9 +3216,9 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long.as.BitAndAssignWith.impl.Op.3b7601.1: %Cpp.long.as.BitAndAssignWith.impl.Op.type.9b8168.1 = struct_value () [concrete] // CHECK:STDOUT: %Cpp.long.as.BitAndAssignWith.impl.Op.type.9b8168.2: type = fn_type @Cpp.long.as.BitAndAssignWith.impl.Op.1, @Cpp.long.as.BitAndAssignWith.impl(%ImplicitAs.facet.87f) [concrete] // CHECK:STDOUT: %Cpp.long.as.BitAndAssignWith.impl.Op.3b7601.2: %Cpp.long.as.BitAndAssignWith.impl.Op.type.9b8168.2 = struct_value () [concrete] -// CHECK:STDOUT: %BitAndAssignWith.facet: %BitAndAssignWith.type.d65 = facet_value %Cpp.long, (%BitAndAssignWith.impl_witness.84d) [concrete] -// CHECK:STDOUT: %BitAndAssignWith.WithSelf.Op.type.400: type = fn_type @BitAndAssignWith.WithSelf.Op, @BitAndAssignWith.WithSelf(%i32, %BitAndAssignWith.facet) [concrete] -// CHECK:STDOUT: %.fd7: type = fn_type_with_self_type %BitAndAssignWith.WithSelf.Op.type.400, %BitAndAssignWith.facet [concrete] +// CHECK:STDOUT: %BitAndAssignWith.facet.479: %BitAndAssignWith.type.d65 = facet_value %Cpp.long, (%BitAndAssignWith.impl_witness.84d) [concrete] +// CHECK:STDOUT: %BitAndAssignWith.WithSelf.Op.type.400: type = fn_type @BitAndAssignWith.WithSelf.Op, @BitAndAssignWith.WithSelf(%i32, %BitAndAssignWith.facet.479) [concrete] +// CHECK:STDOUT: %.fd7: type = fn_type_with_self_type %BitAndAssignWith.WithSelf.Op.type.400, %BitAndAssignWith.facet.479 [concrete] // CHECK:STDOUT: %Cpp.long.as.BitAndAssignWith.impl.Op.specific_fn.94318e.1: = specific_function %Cpp.long.as.BitAndAssignWith.impl.Op.3b7601.2, @Cpp.long.as.BitAndAssignWith.impl.Op.1(%ImplicitAs.facet.87f) [concrete] // CHECK:STDOUT: %Cpp.long.as.BitAndAssignWith.impl.Op.specific_fn.94318e.2: = specific_function %Cpp.long.as.BitAndAssignWith.impl.Op.3b7601.1, @Cpp.long.as.BitAndAssignWith.impl.Op.2(%ImplicitAs.facet.87f) [concrete] // CHECK:STDOUT: %BitOrAssignWith.type.6e9: type = facet_type <@BitOrAssignWith, @BitOrAssignWith(%i32)> [concrete] @@ -3231,9 +3231,9 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long.as.BitOrAssignWith.impl.Op.dcd7c4.1: %Cpp.long.as.BitOrAssignWith.impl.Op.type.198694.1 = struct_value () [concrete] // CHECK:STDOUT: %Cpp.long.as.BitOrAssignWith.impl.Op.type.198694.2: type = fn_type @Cpp.long.as.BitOrAssignWith.impl.Op.1, @Cpp.long.as.BitOrAssignWith.impl(%ImplicitAs.facet.87f) [concrete] // CHECK:STDOUT: %Cpp.long.as.BitOrAssignWith.impl.Op.dcd7c4.2: %Cpp.long.as.BitOrAssignWith.impl.Op.type.198694.2 = struct_value () [concrete] -// CHECK:STDOUT: %BitOrAssignWith.facet: %BitOrAssignWith.type.6e9 = facet_value %Cpp.long, (%BitOrAssignWith.impl_witness.0b0) [concrete] -// CHECK:STDOUT: %BitOrAssignWith.WithSelf.Op.type.ef7: type = fn_type @BitOrAssignWith.WithSelf.Op, @BitOrAssignWith.WithSelf(%i32, %BitOrAssignWith.facet) [concrete] -// CHECK:STDOUT: %.7ba: type = fn_type_with_self_type %BitOrAssignWith.WithSelf.Op.type.ef7, %BitOrAssignWith.facet [concrete] +// CHECK:STDOUT: %BitOrAssignWith.facet.848: %BitOrAssignWith.type.6e9 = facet_value %Cpp.long, (%BitOrAssignWith.impl_witness.0b0) [concrete] +// CHECK:STDOUT: %BitOrAssignWith.WithSelf.Op.type.ef7: type = fn_type @BitOrAssignWith.WithSelf.Op, @BitOrAssignWith.WithSelf(%i32, %BitOrAssignWith.facet.848) [concrete] +// CHECK:STDOUT: %.7ba: type = fn_type_with_self_type %BitOrAssignWith.WithSelf.Op.type.ef7, %BitOrAssignWith.facet.848 [concrete] // CHECK:STDOUT: %Cpp.long.as.BitOrAssignWith.impl.Op.specific_fn.c12656.1: = specific_function %Cpp.long.as.BitOrAssignWith.impl.Op.dcd7c4.2, @Cpp.long.as.BitOrAssignWith.impl.Op.1(%ImplicitAs.facet.87f) [concrete] // CHECK:STDOUT: %Cpp.long.as.BitOrAssignWith.impl.Op.specific_fn.c12656.2: = specific_function %Cpp.long.as.BitOrAssignWith.impl.Op.dcd7c4.1, @Cpp.long.as.BitOrAssignWith.impl.Op.2(%ImplicitAs.facet.87f) [concrete] // CHECK:STDOUT: %BitXorAssignWith.type.ea8: type = facet_type <@BitXorAssignWith, @BitXorAssignWith(%i32)> [concrete] @@ -3246,9 +3246,9 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long.as.BitXorAssignWith.impl.Op.1793e8.1: %Cpp.long.as.BitXorAssignWith.impl.Op.type.0c822c.1 = struct_value () [concrete] // CHECK:STDOUT: %Cpp.long.as.BitXorAssignWith.impl.Op.type.0c822c.2: type = fn_type @Cpp.long.as.BitXorAssignWith.impl.Op.1, @Cpp.long.as.BitXorAssignWith.impl(%ImplicitAs.facet.87f) [concrete] // CHECK:STDOUT: %Cpp.long.as.BitXorAssignWith.impl.Op.1793e8.2: %Cpp.long.as.BitXorAssignWith.impl.Op.type.0c822c.2 = struct_value () [concrete] -// CHECK:STDOUT: %BitXorAssignWith.facet: %BitXorAssignWith.type.ea8 = facet_value %Cpp.long, (%BitXorAssignWith.impl_witness.77c) [concrete] -// CHECK:STDOUT: %BitXorAssignWith.WithSelf.Op.type.a67: type = fn_type @BitXorAssignWith.WithSelf.Op, @BitXorAssignWith.WithSelf(%i32, %BitXorAssignWith.facet) [concrete] -// CHECK:STDOUT: %.03f: type = fn_type_with_self_type %BitXorAssignWith.WithSelf.Op.type.a67, %BitXorAssignWith.facet [concrete] +// CHECK:STDOUT: %BitXorAssignWith.facet.3f6: %BitXorAssignWith.type.ea8 = facet_value %Cpp.long, (%BitXorAssignWith.impl_witness.77c) [concrete] +// CHECK:STDOUT: %BitXorAssignWith.WithSelf.Op.type.a67: type = fn_type @BitXorAssignWith.WithSelf.Op, @BitXorAssignWith.WithSelf(%i32, %BitXorAssignWith.facet.3f6) [concrete] +// CHECK:STDOUT: %.03f: type = fn_type_with_self_type %BitXorAssignWith.WithSelf.Op.type.a67, %BitXorAssignWith.facet.3f6 [concrete] // CHECK:STDOUT: %Cpp.long.as.BitXorAssignWith.impl.Op.specific_fn.1d9822.1: = specific_function %Cpp.long.as.BitXorAssignWith.impl.Op.1793e8.2, @Cpp.long.as.BitXorAssignWith.impl.Op.1(%ImplicitAs.facet.87f) [concrete] // CHECK:STDOUT: %Cpp.long.as.BitXorAssignWith.impl.Op.specific_fn.1d9822.2: = specific_function %Cpp.long.as.BitXorAssignWith.impl.Op.1793e8.1, @Cpp.long.as.BitXorAssignWith.impl.Op.2(%ImplicitAs.facet.87f) [concrete] // CHECK:STDOUT: %LeftShiftAssignWith.type.92b: type = facet_type <@LeftShiftAssignWith, @LeftShiftAssignWith(%i32)> [concrete] @@ -3261,9 +3261,9 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long.as.LeftShiftAssignWith.impl.Op.ba3cb3.1: %Cpp.long.as.LeftShiftAssignWith.impl.Op.type.8bb9f4.1 = struct_value () [concrete] // CHECK:STDOUT: %Cpp.long.as.LeftShiftAssignWith.impl.Op.type.8bb9f4.2: type = fn_type @Cpp.long.as.LeftShiftAssignWith.impl.Op.1, @Cpp.long.as.LeftShiftAssignWith.impl(%ImplicitAs.facet.87f) [concrete] // CHECK:STDOUT: %Cpp.long.as.LeftShiftAssignWith.impl.Op.ba3cb3.2: %Cpp.long.as.LeftShiftAssignWith.impl.Op.type.8bb9f4.2 = struct_value () [concrete] -// CHECK:STDOUT: %LeftShiftAssignWith.facet: %LeftShiftAssignWith.type.92b = facet_value %Cpp.long, (%LeftShiftAssignWith.impl_witness.aa9) [concrete] -// CHECK:STDOUT: %LeftShiftAssignWith.WithSelf.Op.type.483: type = fn_type @LeftShiftAssignWith.WithSelf.Op, @LeftShiftAssignWith.WithSelf(%i32, %LeftShiftAssignWith.facet) [concrete] -// CHECK:STDOUT: %.f43: type = fn_type_with_self_type %LeftShiftAssignWith.WithSelf.Op.type.483, %LeftShiftAssignWith.facet [concrete] +// CHECK:STDOUT: %LeftShiftAssignWith.facet.4eb: %LeftShiftAssignWith.type.92b = facet_value %Cpp.long, (%LeftShiftAssignWith.impl_witness.aa9) [concrete] +// CHECK:STDOUT: %LeftShiftAssignWith.WithSelf.Op.type.483: type = fn_type @LeftShiftAssignWith.WithSelf.Op, @LeftShiftAssignWith.WithSelf(%i32, %LeftShiftAssignWith.facet.4eb) [concrete] +// CHECK:STDOUT: %.f43: type = fn_type_with_self_type %LeftShiftAssignWith.WithSelf.Op.type.483, %LeftShiftAssignWith.facet.4eb [concrete] // CHECK:STDOUT: %Cpp.long.as.LeftShiftAssignWith.impl.Op.specific_fn.dc5ccd.1: = specific_function %Cpp.long.as.LeftShiftAssignWith.impl.Op.ba3cb3.2, @Cpp.long.as.LeftShiftAssignWith.impl.Op.1(%ImplicitAs.facet.87f) [concrete] // CHECK:STDOUT: %Cpp.long.as.LeftShiftAssignWith.impl.Op.specific_fn.dc5ccd.2: = specific_function %Cpp.long.as.LeftShiftAssignWith.impl.Op.ba3cb3.1, @Cpp.long.as.LeftShiftAssignWith.impl.Op.2(%ImplicitAs.facet.87f) [concrete] // CHECK:STDOUT: %RightShiftAssignWith.type.8ae: type = facet_type <@RightShiftAssignWith, @RightShiftAssignWith(%i32)> [concrete] @@ -3276,9 +3276,9 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long.as.RightShiftAssignWith.impl.Op.914893.1: %Cpp.long.as.RightShiftAssignWith.impl.Op.type.9da311.1 = struct_value () [concrete] // CHECK:STDOUT: %Cpp.long.as.RightShiftAssignWith.impl.Op.type.9da311.2: type = fn_type @Cpp.long.as.RightShiftAssignWith.impl.Op.1, @Cpp.long.as.RightShiftAssignWith.impl(%ImplicitAs.facet.87f) [concrete] // CHECK:STDOUT: %Cpp.long.as.RightShiftAssignWith.impl.Op.914893.2: %Cpp.long.as.RightShiftAssignWith.impl.Op.type.9da311.2 = struct_value () [concrete] -// CHECK:STDOUT: %RightShiftAssignWith.facet: %RightShiftAssignWith.type.8ae = facet_value %Cpp.long, (%RightShiftAssignWith.impl_witness.767) [concrete] -// CHECK:STDOUT: %RightShiftAssignWith.WithSelf.Op.type.b3d: type = fn_type @RightShiftAssignWith.WithSelf.Op, @RightShiftAssignWith.WithSelf(%i32, %RightShiftAssignWith.facet) [concrete] -// CHECK:STDOUT: %.55e: type = fn_type_with_self_type %RightShiftAssignWith.WithSelf.Op.type.b3d, %RightShiftAssignWith.facet [concrete] +// CHECK:STDOUT: %RightShiftAssignWith.facet.669: %RightShiftAssignWith.type.8ae = facet_value %Cpp.long, (%RightShiftAssignWith.impl_witness.767) [concrete] +// CHECK:STDOUT: %RightShiftAssignWith.WithSelf.Op.type.b3d: type = fn_type @RightShiftAssignWith.WithSelf.Op, @RightShiftAssignWith.WithSelf(%i32, %RightShiftAssignWith.facet.669) [concrete] +// CHECK:STDOUT: %.55e: type = fn_type_with_self_type %RightShiftAssignWith.WithSelf.Op.type.b3d, %RightShiftAssignWith.facet.669 [concrete] // CHECK:STDOUT: %Cpp.long.as.RightShiftAssignWith.impl.Op.specific_fn.96f972.1: = specific_function %Cpp.long.as.RightShiftAssignWith.impl.Op.914893.2, @Cpp.long.as.RightShiftAssignWith.impl.Op.1(%ImplicitAs.facet.87f) [concrete] // CHECK:STDOUT: %Cpp.long.as.RightShiftAssignWith.impl.Op.specific_fn.96f972.2: = specific_function %Cpp.long.as.RightShiftAssignWith.impl.Op.914893.1, @Cpp.long.as.RightShiftAssignWith.impl.Op.2(%ImplicitAs.facet.87f) [concrete] // CHECK:STDOUT: %Destroy.Op.type.bae255.2: type = fn_type @Destroy.Op.loc9_3.2 [concrete] @@ -3626,9 +3626,9 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long.as.AddAssignWith.impl.Op.025560.1: %Cpp.long.as.AddAssignWith.impl.Op.type.dedb88.1 = struct_value () [concrete] // CHECK:STDOUT: %Cpp.long.as.AddAssignWith.impl.Op.type.dedb88.2: type = fn_type @Cpp.long.as.AddAssignWith.impl.Op.1, @Cpp.long.as.AddAssignWith.impl(%ImplicitAs.facet) [concrete] // CHECK:STDOUT: %Cpp.long.as.AddAssignWith.impl.Op.025560.2: %Cpp.long.as.AddAssignWith.impl.Op.type.dedb88.2 = struct_value () [concrete] -// CHECK:STDOUT: %AddAssignWith.facet: %AddAssignWith.type.761 = facet_value %Cpp.long, (%AddAssignWith.impl_witness.857) [concrete] -// CHECK:STDOUT: %AddAssignWith.WithSelf.Op.type.964: type = fn_type @AddAssignWith.WithSelf.Op, @AddAssignWith.WithSelf(Core.IntLiteral, %AddAssignWith.facet) [concrete] -// CHECK:STDOUT: %.e15: type = fn_type_with_self_type %AddAssignWith.WithSelf.Op.type.964, %AddAssignWith.facet [concrete] +// CHECK:STDOUT: %AddAssignWith.facet.4f9: %AddAssignWith.type.761 = facet_value %Cpp.long, (%AddAssignWith.impl_witness.857) [concrete] +// CHECK:STDOUT: %AddAssignWith.WithSelf.Op.type.964: type = fn_type @AddAssignWith.WithSelf.Op, @AddAssignWith.WithSelf(Core.IntLiteral, %AddAssignWith.facet.4f9) [concrete] +// CHECK:STDOUT: %.e15: type = fn_type_with_self_type %AddAssignWith.WithSelf.Op.type.964, %AddAssignWith.facet.4f9 [concrete] // CHECK:STDOUT: %Cpp.long.as.AddAssignWith.impl.Op.specific_fn.3f8ea9.1: = specific_function %Cpp.long.as.AddAssignWith.impl.Op.025560.2, @Cpp.long.as.AddAssignWith.impl.Op.1(%ImplicitAs.facet) [concrete] // CHECK:STDOUT: %Cpp.long.as.AddAssignWith.impl.Op.specific_fn.3f8ea9.2: = specific_function %Cpp.long.as.AddAssignWith.impl.Op.025560.1, @Cpp.long.as.AddAssignWith.impl.Op.2(%ImplicitAs.facet) [concrete] // CHECK:STDOUT: %Destroy.Op.type.bae255.2: type = fn_type @Destroy.Op.loc8_3.2 [concrete] @@ -3748,9 +3748,9 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long.as.AddAssignWith.impl.Op.18480a.1: %Cpp.long.as.AddAssignWith.impl.Op.type.88b7ef.1 = struct_value () [concrete] // CHECK:STDOUT: %Cpp.long.as.AddAssignWith.impl.Op.type.88b7ef.2: type = fn_type @Cpp.long.as.AddAssignWith.impl.Op.1, @Cpp.long.as.AddAssignWith.impl(%ImplicitAs.facet.87f) [concrete] // CHECK:STDOUT: %Cpp.long.as.AddAssignWith.impl.Op.18480a.2: %Cpp.long.as.AddAssignWith.impl.Op.type.88b7ef.2 = struct_value () [concrete] -// CHECK:STDOUT: %AddAssignWith.facet: %AddAssignWith.type.794 = facet_value %Cpp.long, (%AddAssignWith.impl_witness.8a4) [concrete] -// CHECK:STDOUT: %AddAssignWith.WithSelf.Op.type.7e7: type = fn_type @AddAssignWith.WithSelf.Op, @AddAssignWith.WithSelf(%i32, %AddAssignWith.facet) [concrete] -// CHECK:STDOUT: %.3bf: type = fn_type_with_self_type %AddAssignWith.WithSelf.Op.type.7e7, %AddAssignWith.facet [concrete] +// CHECK:STDOUT: %AddAssignWith.facet.a4a: %AddAssignWith.type.794 = facet_value %Cpp.long, (%AddAssignWith.impl_witness.8a4) [concrete] +// CHECK:STDOUT: %AddAssignWith.WithSelf.Op.type.7e7: type = fn_type @AddAssignWith.WithSelf.Op, @AddAssignWith.WithSelf(%i32, %AddAssignWith.facet.a4a) [concrete] +// CHECK:STDOUT: %.3bf: type = fn_type_with_self_type %AddAssignWith.WithSelf.Op.type.7e7, %AddAssignWith.facet.a4a [concrete] // CHECK:STDOUT: %Cpp.long.as.AddAssignWith.impl.Op.specific_fn.c51759.1: = specific_function %Cpp.long.as.AddAssignWith.impl.Op.18480a.2, @Cpp.long.as.AddAssignWith.impl.Op.1(%ImplicitAs.facet.87f) [concrete] // CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.595: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs.WithSelf(%Cpp.long, %ImplicitAs.facet.87f) [concrete] // CHECK:STDOUT: %.d59: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.595, %ImplicitAs.facet.87f [concrete] 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 e9cbbf19f417..00dd6a4329f9 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 @@ -1369,32 +1369,32 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %int_1.092: %Cpp.long_long = int_value 1 [concrete] // CHECK:STDOUT: %EqWith.type.4be: type = facet_type <@EqWith, @EqWith(%Cpp.long_long)> [concrete] // CHECK:STDOUT: %EqWith.impl_witness.891: = impl_witness imports.%EqWith.impl_witness_table.dc5 [concrete] -// CHECK:STDOUT: %EqWith.facet: %EqWith.type.4be = facet_value %Cpp.long_long, (%EqWith.impl_witness.891) [concrete] -// CHECK:STDOUT: %EqWith.WithSelf.Equal.type.ca7: type = fn_type @EqWith.WithSelf.Equal, @EqWith.WithSelf(%Cpp.long_long, %EqWith.facet) [concrete] -// CHECK:STDOUT: %EqWith.WithSelf.NotEqual.type.41f: type = fn_type @EqWith.WithSelf.NotEqual, @EqWith.WithSelf(%Cpp.long_long, %EqWith.facet) [concrete] -// CHECK:STDOUT: %.b62: type = fn_type_with_self_type %EqWith.WithSelf.Equal.type.ca7, %EqWith.facet [concrete] +// CHECK:STDOUT: %EqWith.facet.06c: %EqWith.type.4be = facet_value %Cpp.long_long, (%EqWith.impl_witness.891) [concrete] +// CHECK:STDOUT: %EqWith.WithSelf.Equal.type.ca7: type = fn_type @EqWith.WithSelf.Equal, @EqWith.WithSelf(%Cpp.long_long, %EqWith.facet.06c) [concrete] +// CHECK:STDOUT: %EqWith.WithSelf.NotEqual.type.41f: type = fn_type @EqWith.WithSelf.NotEqual, @EqWith.WithSelf(%Cpp.long_long, %EqWith.facet.06c) [concrete] +// CHECK:STDOUT: %.b62: type = fn_type_with_self_type %EqWith.WithSelf.Equal.type.ca7, %EqWith.facet.06c [concrete] // CHECK:STDOUT: %Cpp.long_long.as.EqWith.impl.Equal.type.5dc: type = fn_type @Cpp.long_long.as.EqWith.impl.Equal.3 [concrete] // CHECK:STDOUT: %Cpp.long_long.as.EqWith.impl.Equal.1f3: %Cpp.long_long.as.EqWith.impl.Equal.type.5dc = struct_value () [concrete] -// CHECK:STDOUT: %.81b: type = fn_type_with_self_type %EqWith.WithSelf.NotEqual.type.41f, %EqWith.facet [concrete] +// CHECK:STDOUT: %.81b: type = fn_type_with_self_type %EqWith.WithSelf.NotEqual.type.41f, %EqWith.facet.06c [concrete] // CHECK:STDOUT: %Cpp.long_long.as.EqWith.impl.NotEqual.type.282: type = fn_type @Cpp.long_long.as.EqWith.impl.NotEqual.3 [concrete] // CHECK:STDOUT: %Cpp.long_long.as.EqWith.impl.NotEqual.8e9: %Cpp.long_long.as.EqWith.impl.NotEqual.type.282 = struct_value () [concrete] // CHECK:STDOUT: %OrderedWith.type.65e: type = facet_type <@OrderedWith, @OrderedWith(%Cpp.long_long)> [concrete] // CHECK:STDOUT: %OrderedWith.impl_witness.f2c: = impl_witness imports.%OrderedWith.impl_witness_table.547 [concrete] -// CHECK:STDOUT: %OrderedWith.facet: %OrderedWith.type.65e = facet_value %Cpp.long_long, (%OrderedWith.impl_witness.f2c) [concrete] -// CHECK:STDOUT: %OrderedWith.WithSelf.Less.type.6ab: type = fn_type @OrderedWith.WithSelf.Less, @OrderedWith.WithSelf(%Cpp.long_long, %OrderedWith.facet) [concrete] -// CHECK:STDOUT: %OrderedWith.WithSelf.LessOrEquivalent.type.b52: type = fn_type @OrderedWith.WithSelf.LessOrEquivalent, @OrderedWith.WithSelf(%Cpp.long_long, %OrderedWith.facet) [concrete] -// CHECK:STDOUT: %OrderedWith.WithSelf.Greater.type.969: type = fn_type @OrderedWith.WithSelf.Greater, @OrderedWith.WithSelf(%Cpp.long_long, %OrderedWith.facet) [concrete] -// CHECK:STDOUT: %OrderedWith.WithSelf.GreaterOrEquivalent.type.c71: type = fn_type @OrderedWith.WithSelf.GreaterOrEquivalent, @OrderedWith.WithSelf(%Cpp.long_long, %OrderedWith.facet) [concrete] -// CHECK:STDOUT: %.ba7: type = fn_type_with_self_type %OrderedWith.WithSelf.Greater.type.969, %OrderedWith.facet [concrete] +// CHECK:STDOUT: %OrderedWith.facet.20f: %OrderedWith.type.65e = facet_value %Cpp.long_long, (%OrderedWith.impl_witness.f2c) [concrete] +// CHECK:STDOUT: %OrderedWith.WithSelf.Less.type.6ab: type = fn_type @OrderedWith.WithSelf.Less, @OrderedWith.WithSelf(%Cpp.long_long, %OrderedWith.facet.20f) [concrete] +// CHECK:STDOUT: %OrderedWith.WithSelf.LessOrEquivalent.type.b52: type = fn_type @OrderedWith.WithSelf.LessOrEquivalent, @OrderedWith.WithSelf(%Cpp.long_long, %OrderedWith.facet.20f) [concrete] +// CHECK:STDOUT: %OrderedWith.WithSelf.Greater.type.969: type = fn_type @OrderedWith.WithSelf.Greater, @OrderedWith.WithSelf(%Cpp.long_long, %OrderedWith.facet.20f) [concrete] +// CHECK:STDOUT: %OrderedWith.WithSelf.GreaterOrEquivalent.type.c71: type = fn_type @OrderedWith.WithSelf.GreaterOrEquivalent, @OrderedWith.WithSelf(%Cpp.long_long, %OrderedWith.facet.20f) [concrete] +// CHECK:STDOUT: %.ba7: type = fn_type_with_self_type %OrderedWith.WithSelf.Greater.type.969, %OrderedWith.facet.20f [concrete] // CHECK:STDOUT: %Cpp.long_long.as.OrderedWith.impl.Greater.type.366: type = fn_type @Cpp.long_long.as.OrderedWith.impl.Greater.3 [concrete] // CHECK:STDOUT: %Cpp.long_long.as.OrderedWith.impl.Greater.98e: %Cpp.long_long.as.OrderedWith.impl.Greater.type.366 = struct_value () [concrete] -// CHECK:STDOUT: %.3bb: type = fn_type_with_self_type %OrderedWith.WithSelf.Less.type.6ab, %OrderedWith.facet [concrete] +// CHECK:STDOUT: %.3bb: type = fn_type_with_self_type %OrderedWith.WithSelf.Less.type.6ab, %OrderedWith.facet.20f [concrete] // CHECK:STDOUT: %Cpp.long_long.as.OrderedWith.impl.Less.type.14b: type = fn_type @Cpp.long_long.as.OrderedWith.impl.Less.3 [concrete] // CHECK:STDOUT: %Cpp.long_long.as.OrderedWith.impl.Less.806: %Cpp.long_long.as.OrderedWith.impl.Less.type.14b = struct_value () [concrete] -// CHECK:STDOUT: %.ab6: type = fn_type_with_self_type %OrderedWith.WithSelf.GreaterOrEquivalent.type.c71, %OrderedWith.facet [concrete] +// CHECK:STDOUT: %.ab6: type = fn_type_with_self_type %OrderedWith.WithSelf.GreaterOrEquivalent.type.c71, %OrderedWith.facet.20f [concrete] // CHECK:STDOUT: %Cpp.long_long.as.OrderedWith.impl.GreaterOrEquivalent.type.58e: type = fn_type @Cpp.long_long.as.OrderedWith.impl.GreaterOrEquivalent.3 [concrete] // CHECK:STDOUT: %Cpp.long_long.as.OrderedWith.impl.GreaterOrEquivalent.90e: %Cpp.long_long.as.OrderedWith.impl.GreaterOrEquivalent.type.58e = struct_value () [concrete] -// CHECK:STDOUT: %.ae4: type = fn_type_with_self_type %OrderedWith.WithSelf.LessOrEquivalent.type.b52, %OrderedWith.facet [concrete] +// CHECK:STDOUT: %.ae4: type = fn_type_with_self_type %OrderedWith.WithSelf.LessOrEquivalent.type.b52, %OrderedWith.facet.20f [concrete] // CHECK:STDOUT: %Cpp.long_long.as.OrderedWith.impl.LessOrEquivalent.type.cba: type = fn_type @Cpp.long_long.as.OrderedWith.impl.LessOrEquivalent.3 [concrete] // CHECK:STDOUT: %Cpp.long_long.as.OrderedWith.impl.LessOrEquivalent.01d: %Cpp.long_long.as.OrderedWith.impl.LessOrEquivalent.type.cba = struct_value () [concrete] // CHECK:STDOUT: } @@ -2436,9 +2436,9 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Cpp.long_long.as.AddAssignWith.impl.Op.9f5215.1: %Cpp.long_long.as.AddAssignWith.impl.Op.type.764577.1 = struct_value () [concrete] // CHECK:STDOUT: %Cpp.long_long.as.AddAssignWith.impl.Op.type.764577.2: type = fn_type @Cpp.long_long.as.AddAssignWith.impl.Op.1, @Cpp.long_long.as.AddAssignWith.impl(%ImplicitAs.facet.73b) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.AddAssignWith.impl.Op.9f5215.2: %Cpp.long_long.as.AddAssignWith.impl.Op.type.764577.2 = struct_value () [concrete] -// CHECK:STDOUT: %AddAssignWith.facet: %AddAssignWith.type.2ec = facet_value %Cpp.long_long, (%AddAssignWith.impl_witness.bf6) [concrete] -// CHECK:STDOUT: %AddAssignWith.WithSelf.Op.type.03b: type = fn_type @AddAssignWith.WithSelf.Op, @AddAssignWith.WithSelf(%Cpp.long_long, %AddAssignWith.facet) [concrete] -// CHECK:STDOUT: %.e56: type = fn_type_with_self_type %AddAssignWith.WithSelf.Op.type.03b, %AddAssignWith.facet [concrete] +// CHECK:STDOUT: %AddAssignWith.facet.628: %AddAssignWith.type.2ec = facet_value %Cpp.long_long, (%AddAssignWith.impl_witness.bf6) [concrete] +// CHECK:STDOUT: %AddAssignWith.WithSelf.Op.type.03b: type = fn_type @AddAssignWith.WithSelf.Op, @AddAssignWith.WithSelf(%Cpp.long_long, %AddAssignWith.facet.628) [concrete] +// CHECK:STDOUT: %.e56: type = fn_type_with_self_type %AddAssignWith.WithSelf.Op.type.03b, %AddAssignWith.facet.628 [concrete] // CHECK:STDOUT: %Cpp.long_long.as.AddAssignWith.impl.Op.specific_fn.cf84ae.1: = specific_function %Cpp.long_long.as.AddAssignWith.impl.Op.9f5215.2, @Cpp.long_long.as.AddAssignWith.impl.Op.1(%ImplicitAs.facet.73b) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.AddAssignWith.impl.Op.specific_fn.cf84ae.2: = specific_function %Cpp.long_long.as.AddAssignWith.impl.Op.9f5215.1, @Cpp.long_long.as.AddAssignWith.impl.Op.2(%ImplicitAs.facet.73b) [concrete] // CHECK:STDOUT: %SubAssignWith.type.b35: type = facet_type <@SubAssignWith, @SubAssignWith(%Cpp.long_long)> [concrete] @@ -2451,9 +2451,9 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Cpp.long_long.as.SubAssignWith.impl.Op.055560.1: %Cpp.long_long.as.SubAssignWith.impl.Op.type.bbcd3f.1 = struct_value () [concrete] // CHECK:STDOUT: %Cpp.long_long.as.SubAssignWith.impl.Op.type.bbcd3f.2: type = fn_type @Cpp.long_long.as.SubAssignWith.impl.Op.1, @Cpp.long_long.as.SubAssignWith.impl(%ImplicitAs.facet.73b) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.SubAssignWith.impl.Op.055560.2: %Cpp.long_long.as.SubAssignWith.impl.Op.type.bbcd3f.2 = struct_value () [concrete] -// CHECK:STDOUT: %SubAssignWith.facet: %SubAssignWith.type.b35 = facet_value %Cpp.long_long, (%SubAssignWith.impl_witness.ca9) [concrete] -// CHECK:STDOUT: %SubAssignWith.WithSelf.Op.type.010: type = fn_type @SubAssignWith.WithSelf.Op, @SubAssignWith.WithSelf(%Cpp.long_long, %SubAssignWith.facet) [concrete] -// CHECK:STDOUT: %.d9d: type = fn_type_with_self_type %SubAssignWith.WithSelf.Op.type.010, %SubAssignWith.facet [concrete] +// CHECK:STDOUT: %SubAssignWith.facet.0a2: %SubAssignWith.type.b35 = facet_value %Cpp.long_long, (%SubAssignWith.impl_witness.ca9) [concrete] +// CHECK:STDOUT: %SubAssignWith.WithSelf.Op.type.010: type = fn_type @SubAssignWith.WithSelf.Op, @SubAssignWith.WithSelf(%Cpp.long_long, %SubAssignWith.facet.0a2) [concrete] +// CHECK:STDOUT: %.d9d: type = fn_type_with_self_type %SubAssignWith.WithSelf.Op.type.010, %SubAssignWith.facet.0a2 [concrete] // CHECK:STDOUT: %Cpp.long_long.as.SubAssignWith.impl.Op.specific_fn.3f0e56.1: = specific_function %Cpp.long_long.as.SubAssignWith.impl.Op.055560.2, @Cpp.long_long.as.SubAssignWith.impl.Op.1(%ImplicitAs.facet.73b) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.SubAssignWith.impl.Op.specific_fn.3f0e56.2: = specific_function %Cpp.long_long.as.SubAssignWith.impl.Op.055560.1, @Cpp.long_long.as.SubAssignWith.impl.Op.2(%ImplicitAs.facet.73b) [concrete] // CHECK:STDOUT: %MulAssignWith.type.112: type = facet_type <@MulAssignWith, @MulAssignWith(%Cpp.long_long)> [concrete] @@ -2466,9 +2466,9 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Cpp.long_long.as.MulAssignWith.impl.Op.615bbe.1: %Cpp.long_long.as.MulAssignWith.impl.Op.type.930c4a.1 = struct_value () [concrete] // CHECK:STDOUT: %Cpp.long_long.as.MulAssignWith.impl.Op.type.930c4a.2: type = fn_type @Cpp.long_long.as.MulAssignWith.impl.Op.1, @Cpp.long_long.as.MulAssignWith.impl(%ImplicitAs.facet.73b) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.MulAssignWith.impl.Op.615bbe.2: %Cpp.long_long.as.MulAssignWith.impl.Op.type.930c4a.2 = struct_value () [concrete] -// CHECK:STDOUT: %MulAssignWith.facet: %MulAssignWith.type.112 = facet_value %Cpp.long_long, (%MulAssignWith.impl_witness.6f5) [concrete] -// CHECK:STDOUT: %MulAssignWith.WithSelf.Op.type.16b: type = fn_type @MulAssignWith.WithSelf.Op, @MulAssignWith.WithSelf(%Cpp.long_long, %MulAssignWith.facet) [concrete] -// CHECK:STDOUT: %.3df: type = fn_type_with_self_type %MulAssignWith.WithSelf.Op.type.16b, %MulAssignWith.facet [concrete] +// CHECK:STDOUT: %MulAssignWith.facet.3ad: %MulAssignWith.type.112 = facet_value %Cpp.long_long, (%MulAssignWith.impl_witness.6f5) [concrete] +// CHECK:STDOUT: %MulAssignWith.WithSelf.Op.type.16b: type = fn_type @MulAssignWith.WithSelf.Op, @MulAssignWith.WithSelf(%Cpp.long_long, %MulAssignWith.facet.3ad) [concrete] +// CHECK:STDOUT: %.3df: type = fn_type_with_self_type %MulAssignWith.WithSelf.Op.type.16b, %MulAssignWith.facet.3ad [concrete] // CHECK:STDOUT: %Cpp.long_long.as.MulAssignWith.impl.Op.specific_fn.54521e.1: = specific_function %Cpp.long_long.as.MulAssignWith.impl.Op.615bbe.2, @Cpp.long_long.as.MulAssignWith.impl.Op.1(%ImplicitAs.facet.73b) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.MulAssignWith.impl.Op.specific_fn.54521e.2: = specific_function %Cpp.long_long.as.MulAssignWith.impl.Op.615bbe.1, @Cpp.long_long.as.MulAssignWith.impl.Op.2(%ImplicitAs.facet.73b) [concrete] // CHECK:STDOUT: %DivAssignWith.type.45d: type = facet_type <@DivAssignWith, @DivAssignWith(%Cpp.long_long)> [concrete] @@ -2481,9 +2481,9 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Cpp.long_long.as.DivAssignWith.impl.Op.edd3fd.1: %Cpp.long_long.as.DivAssignWith.impl.Op.type.0750e7.1 = struct_value () [concrete] // CHECK:STDOUT: %Cpp.long_long.as.DivAssignWith.impl.Op.type.0750e7.2: type = fn_type @Cpp.long_long.as.DivAssignWith.impl.Op.1, @Cpp.long_long.as.DivAssignWith.impl(%ImplicitAs.facet.73b) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.DivAssignWith.impl.Op.edd3fd.2: %Cpp.long_long.as.DivAssignWith.impl.Op.type.0750e7.2 = struct_value () [concrete] -// CHECK:STDOUT: %DivAssignWith.facet: %DivAssignWith.type.45d = facet_value %Cpp.long_long, (%DivAssignWith.impl_witness.18b) [concrete] -// CHECK:STDOUT: %DivAssignWith.WithSelf.Op.type.2f0: type = fn_type @DivAssignWith.WithSelf.Op, @DivAssignWith.WithSelf(%Cpp.long_long, %DivAssignWith.facet) [concrete] -// CHECK:STDOUT: %.e87: type = fn_type_with_self_type %DivAssignWith.WithSelf.Op.type.2f0, %DivAssignWith.facet [concrete] +// CHECK:STDOUT: %DivAssignWith.facet.328: %DivAssignWith.type.45d = facet_value %Cpp.long_long, (%DivAssignWith.impl_witness.18b) [concrete] +// CHECK:STDOUT: %DivAssignWith.WithSelf.Op.type.2f0: type = fn_type @DivAssignWith.WithSelf.Op, @DivAssignWith.WithSelf(%Cpp.long_long, %DivAssignWith.facet.328) [concrete] +// CHECK:STDOUT: %.e87: type = fn_type_with_self_type %DivAssignWith.WithSelf.Op.type.2f0, %DivAssignWith.facet.328 [concrete] // CHECK:STDOUT: %Cpp.long_long.as.DivAssignWith.impl.Op.specific_fn.615d14.1: = specific_function %Cpp.long_long.as.DivAssignWith.impl.Op.edd3fd.2, @Cpp.long_long.as.DivAssignWith.impl.Op.1(%ImplicitAs.facet.73b) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.DivAssignWith.impl.Op.specific_fn.615d14.2: = specific_function %Cpp.long_long.as.DivAssignWith.impl.Op.edd3fd.1, @Cpp.long_long.as.DivAssignWith.impl.Op.2(%ImplicitAs.facet.73b) [concrete] // CHECK:STDOUT: %ModAssignWith.type.a2e: type = facet_type <@ModAssignWith, @ModAssignWith(%Cpp.long_long)> [concrete] @@ -2496,9 +2496,9 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Cpp.long_long.as.ModAssignWith.impl.Op.b6ce41.1: %Cpp.long_long.as.ModAssignWith.impl.Op.type.423758.1 = struct_value () [concrete] // CHECK:STDOUT: %Cpp.long_long.as.ModAssignWith.impl.Op.type.423758.2: type = fn_type @Cpp.long_long.as.ModAssignWith.impl.Op.1, @Cpp.long_long.as.ModAssignWith.impl(%ImplicitAs.facet.73b) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.ModAssignWith.impl.Op.b6ce41.2: %Cpp.long_long.as.ModAssignWith.impl.Op.type.423758.2 = struct_value () [concrete] -// CHECK:STDOUT: %ModAssignWith.facet: %ModAssignWith.type.a2e = facet_value %Cpp.long_long, (%ModAssignWith.impl_witness.a7a) [concrete] -// CHECK:STDOUT: %ModAssignWith.WithSelf.Op.type.e9d: type = fn_type @ModAssignWith.WithSelf.Op, @ModAssignWith.WithSelf(%Cpp.long_long, %ModAssignWith.facet) [concrete] -// CHECK:STDOUT: %.1d8: type = fn_type_with_self_type %ModAssignWith.WithSelf.Op.type.e9d, %ModAssignWith.facet [concrete] +// CHECK:STDOUT: %ModAssignWith.facet.9c3: %ModAssignWith.type.a2e = facet_value %Cpp.long_long, (%ModAssignWith.impl_witness.a7a) [concrete] +// CHECK:STDOUT: %ModAssignWith.WithSelf.Op.type.e9d: type = fn_type @ModAssignWith.WithSelf.Op, @ModAssignWith.WithSelf(%Cpp.long_long, %ModAssignWith.facet.9c3) [concrete] +// CHECK:STDOUT: %.1d8: type = fn_type_with_self_type %ModAssignWith.WithSelf.Op.type.e9d, %ModAssignWith.facet.9c3 [concrete] // CHECK:STDOUT: %Cpp.long_long.as.ModAssignWith.impl.Op.specific_fn.49870b.1: = specific_function %Cpp.long_long.as.ModAssignWith.impl.Op.b6ce41.2, @Cpp.long_long.as.ModAssignWith.impl.Op.1(%ImplicitAs.facet.73b) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.ModAssignWith.impl.Op.specific_fn.49870b.2: = specific_function %Cpp.long_long.as.ModAssignWith.impl.Op.b6ce41.1, @Cpp.long_long.as.ModAssignWith.impl.Op.2(%ImplicitAs.facet.73b) [concrete] // CHECK:STDOUT: %BitAndAssignWith.type.9bc: type = facet_type <@BitAndAssignWith, @BitAndAssignWith(%Cpp.long_long)> [concrete] @@ -2511,9 +2511,9 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Cpp.long_long.as.BitAndAssignWith.impl.Op.492145.1: %Cpp.long_long.as.BitAndAssignWith.impl.Op.type.34c5a7.1 = struct_value () [concrete] // CHECK:STDOUT: %Cpp.long_long.as.BitAndAssignWith.impl.Op.type.34c5a7.2: type = fn_type @Cpp.long_long.as.BitAndAssignWith.impl.Op.1, @Cpp.long_long.as.BitAndAssignWith.impl(%ImplicitAs.facet.73b) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.BitAndAssignWith.impl.Op.492145.2: %Cpp.long_long.as.BitAndAssignWith.impl.Op.type.34c5a7.2 = struct_value () [concrete] -// CHECK:STDOUT: %BitAndAssignWith.facet: %BitAndAssignWith.type.9bc = facet_value %Cpp.long_long, (%BitAndAssignWith.impl_witness.a42) [concrete] -// CHECK:STDOUT: %BitAndAssignWith.WithSelf.Op.type.8bc: type = fn_type @BitAndAssignWith.WithSelf.Op, @BitAndAssignWith.WithSelf(%Cpp.long_long, %BitAndAssignWith.facet) [concrete] -// CHECK:STDOUT: %.564: type = fn_type_with_self_type %BitAndAssignWith.WithSelf.Op.type.8bc, %BitAndAssignWith.facet [concrete] +// CHECK:STDOUT: %BitAndAssignWith.facet.c25: %BitAndAssignWith.type.9bc = facet_value %Cpp.long_long, (%BitAndAssignWith.impl_witness.a42) [concrete] +// CHECK:STDOUT: %BitAndAssignWith.WithSelf.Op.type.8bc: type = fn_type @BitAndAssignWith.WithSelf.Op, @BitAndAssignWith.WithSelf(%Cpp.long_long, %BitAndAssignWith.facet.c25) [concrete] +// CHECK:STDOUT: %.564: type = fn_type_with_self_type %BitAndAssignWith.WithSelf.Op.type.8bc, %BitAndAssignWith.facet.c25 [concrete] // CHECK:STDOUT: %Cpp.long_long.as.BitAndAssignWith.impl.Op.specific_fn.1d5894.1: = specific_function %Cpp.long_long.as.BitAndAssignWith.impl.Op.492145.2, @Cpp.long_long.as.BitAndAssignWith.impl.Op.1(%ImplicitAs.facet.73b) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.BitAndAssignWith.impl.Op.specific_fn.1d5894.2: = specific_function %Cpp.long_long.as.BitAndAssignWith.impl.Op.492145.1, @Cpp.long_long.as.BitAndAssignWith.impl.Op.2(%ImplicitAs.facet.73b) [concrete] // CHECK:STDOUT: %BitOrAssignWith.type.219: type = facet_type <@BitOrAssignWith, @BitOrAssignWith(%Cpp.long_long)> [concrete] @@ -2526,9 +2526,9 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Cpp.long_long.as.BitOrAssignWith.impl.Op.97ef88.1: %Cpp.long_long.as.BitOrAssignWith.impl.Op.type.1655c9.1 = struct_value () [concrete] // CHECK:STDOUT: %Cpp.long_long.as.BitOrAssignWith.impl.Op.type.1655c9.2: type = fn_type @Cpp.long_long.as.BitOrAssignWith.impl.Op.1, @Cpp.long_long.as.BitOrAssignWith.impl(%ImplicitAs.facet.73b) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.BitOrAssignWith.impl.Op.97ef88.2: %Cpp.long_long.as.BitOrAssignWith.impl.Op.type.1655c9.2 = struct_value () [concrete] -// CHECK:STDOUT: %BitOrAssignWith.facet: %BitOrAssignWith.type.219 = facet_value %Cpp.long_long, (%BitOrAssignWith.impl_witness.7cf) [concrete] -// CHECK:STDOUT: %BitOrAssignWith.WithSelf.Op.type.2ae: type = fn_type @BitOrAssignWith.WithSelf.Op, @BitOrAssignWith.WithSelf(%Cpp.long_long, %BitOrAssignWith.facet) [concrete] -// CHECK:STDOUT: %.620: type = fn_type_with_self_type %BitOrAssignWith.WithSelf.Op.type.2ae, %BitOrAssignWith.facet [concrete] +// CHECK:STDOUT: %BitOrAssignWith.facet.958: %BitOrAssignWith.type.219 = facet_value %Cpp.long_long, (%BitOrAssignWith.impl_witness.7cf) [concrete] +// CHECK:STDOUT: %BitOrAssignWith.WithSelf.Op.type.2ae: type = fn_type @BitOrAssignWith.WithSelf.Op, @BitOrAssignWith.WithSelf(%Cpp.long_long, %BitOrAssignWith.facet.958) [concrete] +// CHECK:STDOUT: %.620: type = fn_type_with_self_type %BitOrAssignWith.WithSelf.Op.type.2ae, %BitOrAssignWith.facet.958 [concrete] // CHECK:STDOUT: %Cpp.long_long.as.BitOrAssignWith.impl.Op.specific_fn.76b01d.1: = specific_function %Cpp.long_long.as.BitOrAssignWith.impl.Op.97ef88.2, @Cpp.long_long.as.BitOrAssignWith.impl.Op.1(%ImplicitAs.facet.73b) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.BitOrAssignWith.impl.Op.specific_fn.76b01d.2: = specific_function %Cpp.long_long.as.BitOrAssignWith.impl.Op.97ef88.1, @Cpp.long_long.as.BitOrAssignWith.impl.Op.2(%ImplicitAs.facet.73b) [concrete] // CHECK:STDOUT: %BitXorAssignWith.type.f9d: type = facet_type <@BitXorAssignWith, @BitXorAssignWith(%Cpp.long_long)> [concrete] @@ -2541,9 +2541,9 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Cpp.long_long.as.BitXorAssignWith.impl.Op.60b652.1: %Cpp.long_long.as.BitXorAssignWith.impl.Op.type.42f5ff.1 = struct_value () [concrete] // CHECK:STDOUT: %Cpp.long_long.as.BitXorAssignWith.impl.Op.type.42f5ff.2: type = fn_type @Cpp.long_long.as.BitXorAssignWith.impl.Op.1, @Cpp.long_long.as.BitXorAssignWith.impl(%ImplicitAs.facet.73b) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.BitXorAssignWith.impl.Op.60b652.2: %Cpp.long_long.as.BitXorAssignWith.impl.Op.type.42f5ff.2 = struct_value () [concrete] -// CHECK:STDOUT: %BitXorAssignWith.facet: %BitXorAssignWith.type.f9d = facet_value %Cpp.long_long, (%BitXorAssignWith.impl_witness.0ca) [concrete] -// CHECK:STDOUT: %BitXorAssignWith.WithSelf.Op.type.af7: type = fn_type @BitXorAssignWith.WithSelf.Op, @BitXorAssignWith.WithSelf(%Cpp.long_long, %BitXorAssignWith.facet) [concrete] -// CHECK:STDOUT: %.efd: type = fn_type_with_self_type %BitXorAssignWith.WithSelf.Op.type.af7, %BitXorAssignWith.facet [concrete] +// CHECK:STDOUT: %BitXorAssignWith.facet.55f: %BitXorAssignWith.type.f9d = facet_value %Cpp.long_long, (%BitXorAssignWith.impl_witness.0ca) [concrete] +// CHECK:STDOUT: %BitXorAssignWith.WithSelf.Op.type.af7: type = fn_type @BitXorAssignWith.WithSelf.Op, @BitXorAssignWith.WithSelf(%Cpp.long_long, %BitXorAssignWith.facet.55f) [concrete] +// CHECK:STDOUT: %.efd: type = fn_type_with_self_type %BitXorAssignWith.WithSelf.Op.type.af7, %BitXorAssignWith.facet.55f [concrete] // CHECK:STDOUT: %Cpp.long_long.as.BitXorAssignWith.impl.Op.specific_fn.960526.1: = specific_function %Cpp.long_long.as.BitXorAssignWith.impl.Op.60b652.2, @Cpp.long_long.as.BitXorAssignWith.impl.Op.1(%ImplicitAs.facet.73b) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.BitXorAssignWith.impl.Op.specific_fn.960526.2: = specific_function %Cpp.long_long.as.BitXorAssignWith.impl.Op.60b652.1, @Cpp.long_long.as.BitXorAssignWith.impl.Op.2(%ImplicitAs.facet.73b) [concrete] // CHECK:STDOUT: %LeftShiftAssignWith.type.f24: type = facet_type <@LeftShiftAssignWith, @LeftShiftAssignWith(%Cpp.long_long)> [concrete] @@ -2556,9 +2556,9 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Cpp.long_long.as.LeftShiftAssignWith.impl.Op.e0e938.1: %Cpp.long_long.as.LeftShiftAssignWith.impl.Op.type.c0189e.1 = struct_value () [concrete] // CHECK:STDOUT: %Cpp.long_long.as.LeftShiftAssignWith.impl.Op.type.c0189e.2: type = fn_type @Cpp.long_long.as.LeftShiftAssignWith.impl.Op.1, @Cpp.long_long.as.LeftShiftAssignWith.impl(%ImplicitAs.facet.73b) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.LeftShiftAssignWith.impl.Op.e0e938.2: %Cpp.long_long.as.LeftShiftAssignWith.impl.Op.type.c0189e.2 = struct_value () [concrete] -// CHECK:STDOUT: %LeftShiftAssignWith.facet: %LeftShiftAssignWith.type.f24 = facet_value %Cpp.long_long, (%LeftShiftAssignWith.impl_witness.bee) [concrete] -// CHECK:STDOUT: %LeftShiftAssignWith.WithSelf.Op.type.5d0: type = fn_type @LeftShiftAssignWith.WithSelf.Op, @LeftShiftAssignWith.WithSelf(%Cpp.long_long, %LeftShiftAssignWith.facet) [concrete] -// CHECK:STDOUT: %.ecf: type = fn_type_with_self_type %LeftShiftAssignWith.WithSelf.Op.type.5d0, %LeftShiftAssignWith.facet [concrete] +// CHECK:STDOUT: %LeftShiftAssignWith.facet.078: %LeftShiftAssignWith.type.f24 = facet_value %Cpp.long_long, (%LeftShiftAssignWith.impl_witness.bee) [concrete] +// CHECK:STDOUT: %LeftShiftAssignWith.WithSelf.Op.type.5d0: type = fn_type @LeftShiftAssignWith.WithSelf.Op, @LeftShiftAssignWith.WithSelf(%Cpp.long_long, %LeftShiftAssignWith.facet.078) [concrete] +// CHECK:STDOUT: %.ecf: type = fn_type_with_self_type %LeftShiftAssignWith.WithSelf.Op.type.5d0, %LeftShiftAssignWith.facet.078 [concrete] // CHECK:STDOUT: %Cpp.long_long.as.LeftShiftAssignWith.impl.Op.specific_fn.330db6.1: = specific_function %Cpp.long_long.as.LeftShiftAssignWith.impl.Op.e0e938.2, @Cpp.long_long.as.LeftShiftAssignWith.impl.Op.1(%ImplicitAs.facet.73b) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.LeftShiftAssignWith.impl.Op.specific_fn.330db6.2: = specific_function %Cpp.long_long.as.LeftShiftAssignWith.impl.Op.e0e938.1, @Cpp.long_long.as.LeftShiftAssignWith.impl.Op.2(%ImplicitAs.facet.73b) [concrete] // CHECK:STDOUT: %RightShiftAssignWith.type.42e: type = facet_type <@RightShiftAssignWith, @RightShiftAssignWith(%Cpp.long_long)> [concrete] @@ -2571,9 +2571,9 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Cpp.long_long.as.RightShiftAssignWith.impl.Op.60f372.1: %Cpp.long_long.as.RightShiftAssignWith.impl.Op.type.440250.1 = struct_value () [concrete] // CHECK:STDOUT: %Cpp.long_long.as.RightShiftAssignWith.impl.Op.type.440250.2: type = fn_type @Cpp.long_long.as.RightShiftAssignWith.impl.Op.1, @Cpp.long_long.as.RightShiftAssignWith.impl(%ImplicitAs.facet.73b) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.RightShiftAssignWith.impl.Op.60f372.2: %Cpp.long_long.as.RightShiftAssignWith.impl.Op.type.440250.2 = struct_value () [concrete] -// CHECK:STDOUT: %RightShiftAssignWith.facet: %RightShiftAssignWith.type.42e = facet_value %Cpp.long_long, (%RightShiftAssignWith.impl_witness.b65) [concrete] -// CHECK:STDOUT: %RightShiftAssignWith.WithSelf.Op.type.b72: type = fn_type @RightShiftAssignWith.WithSelf.Op, @RightShiftAssignWith.WithSelf(%Cpp.long_long, %RightShiftAssignWith.facet) [concrete] -// CHECK:STDOUT: %.580: type = fn_type_with_self_type %RightShiftAssignWith.WithSelf.Op.type.b72, %RightShiftAssignWith.facet [concrete] +// CHECK:STDOUT: %RightShiftAssignWith.facet.6bd: %RightShiftAssignWith.type.42e = facet_value %Cpp.long_long, (%RightShiftAssignWith.impl_witness.b65) [concrete] +// CHECK:STDOUT: %RightShiftAssignWith.WithSelf.Op.type.b72: type = fn_type @RightShiftAssignWith.WithSelf.Op, @RightShiftAssignWith.WithSelf(%Cpp.long_long, %RightShiftAssignWith.facet.6bd) [concrete] +// CHECK:STDOUT: %.580: type = fn_type_with_self_type %RightShiftAssignWith.WithSelf.Op.type.b72, %RightShiftAssignWith.facet.6bd [concrete] // CHECK:STDOUT: %Cpp.long_long.as.RightShiftAssignWith.impl.Op.specific_fn.e2803d.1: = specific_function %Cpp.long_long.as.RightShiftAssignWith.impl.Op.60f372.2, @Cpp.long_long.as.RightShiftAssignWith.impl.Op.1(%ImplicitAs.facet.73b) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.RightShiftAssignWith.impl.Op.specific_fn.e2803d.2: = specific_function %Cpp.long_long.as.RightShiftAssignWith.impl.Op.60f372.1, @Cpp.long_long.as.RightShiftAssignWith.impl.Op.2(%ImplicitAs.facet.73b) [concrete] // CHECK:STDOUT: %Destroy.Op.type.bae255.2: type = fn_type @Destroy.Op.loc9_3.2 [concrete] @@ -2855,9 +2855,9 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Cpp.long_long.as.AddAssignWith.impl.Op.3aaab8.1: %Cpp.long_long.as.AddAssignWith.impl.Op.type.61f9d4.1 = struct_value () [concrete] // CHECK:STDOUT: %Cpp.long_long.as.AddAssignWith.impl.Op.type.61f9d4.2: type = fn_type @Cpp.long_long.as.AddAssignWith.impl.Op.1, @Cpp.long_long.as.AddAssignWith.impl(%ImplicitAs.facet.cee) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.AddAssignWith.impl.Op.3aaab8.2: %Cpp.long_long.as.AddAssignWith.impl.Op.type.61f9d4.2 = struct_value () [concrete] -// CHECK:STDOUT: %AddAssignWith.facet: %AddAssignWith.type.d84 = facet_value %Cpp.long_long, (%AddAssignWith.impl_witness.c98) [concrete] -// CHECK:STDOUT: %AddAssignWith.WithSelf.Op.type.9f5: type = fn_type @AddAssignWith.WithSelf.Op, @AddAssignWith.WithSelf(%i64, %AddAssignWith.facet) [concrete] -// CHECK:STDOUT: %.605: type = fn_type_with_self_type %AddAssignWith.WithSelf.Op.type.9f5, %AddAssignWith.facet [concrete] +// CHECK:STDOUT: %AddAssignWith.facet.0dd: %AddAssignWith.type.d84 = facet_value %Cpp.long_long, (%AddAssignWith.impl_witness.c98) [concrete] +// CHECK:STDOUT: %AddAssignWith.WithSelf.Op.type.9f5: type = fn_type @AddAssignWith.WithSelf.Op, @AddAssignWith.WithSelf(%i64, %AddAssignWith.facet.0dd) [concrete] +// CHECK:STDOUT: %.605: type = fn_type_with_self_type %AddAssignWith.WithSelf.Op.type.9f5, %AddAssignWith.facet.0dd [concrete] // CHECK:STDOUT: %Cpp.long_long.as.AddAssignWith.impl.Op.specific_fn.47f55f.1: = specific_function %Cpp.long_long.as.AddAssignWith.impl.Op.3aaab8.2, @Cpp.long_long.as.AddAssignWith.impl.Op.1(%ImplicitAs.facet.cee) [concrete] // CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.479: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs.WithSelf(%Cpp.long_long, %ImplicitAs.facet.cee) [concrete] // CHECK:STDOUT: %.48b: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.479, %ImplicitAs.facet.cee [concrete] @@ -2874,9 +2874,9 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Cpp.long_long.as.SubAssignWith.impl.Op.65ca20.1: %Cpp.long_long.as.SubAssignWith.impl.Op.type.e891c3.1 = struct_value () [concrete] // CHECK:STDOUT: %Cpp.long_long.as.SubAssignWith.impl.Op.type.e891c3.2: type = fn_type @Cpp.long_long.as.SubAssignWith.impl.Op.1, @Cpp.long_long.as.SubAssignWith.impl(%ImplicitAs.facet.cee) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.SubAssignWith.impl.Op.65ca20.2: %Cpp.long_long.as.SubAssignWith.impl.Op.type.e891c3.2 = struct_value () [concrete] -// CHECK:STDOUT: %SubAssignWith.facet: %SubAssignWith.type.d66 = facet_value %Cpp.long_long, (%SubAssignWith.impl_witness.230) [concrete] -// CHECK:STDOUT: %SubAssignWith.WithSelf.Op.type.f81: type = fn_type @SubAssignWith.WithSelf.Op, @SubAssignWith.WithSelf(%i64, %SubAssignWith.facet) [concrete] -// CHECK:STDOUT: %.d45: type = fn_type_with_self_type %SubAssignWith.WithSelf.Op.type.f81, %SubAssignWith.facet [concrete] +// CHECK:STDOUT: %SubAssignWith.facet.0cd: %SubAssignWith.type.d66 = facet_value %Cpp.long_long, (%SubAssignWith.impl_witness.230) [concrete] +// CHECK:STDOUT: %SubAssignWith.WithSelf.Op.type.f81: type = fn_type @SubAssignWith.WithSelf.Op, @SubAssignWith.WithSelf(%i64, %SubAssignWith.facet.0cd) [concrete] +// CHECK:STDOUT: %.d45: type = fn_type_with_self_type %SubAssignWith.WithSelf.Op.type.f81, %SubAssignWith.facet.0cd [concrete] // CHECK:STDOUT: %Cpp.long_long.as.SubAssignWith.impl.Op.specific_fn.a1a11e.1: = specific_function %Cpp.long_long.as.SubAssignWith.impl.Op.65ca20.2, @Cpp.long_long.as.SubAssignWith.impl.Op.1(%ImplicitAs.facet.cee) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.SubAssignWith.impl.Op.specific_fn.a1a11e.2: = specific_function %Cpp.long_long.as.SubAssignWith.impl.Op.65ca20.1, @Cpp.long_long.as.SubAssignWith.impl.Op.2(%ImplicitAs.facet.cee) [concrete] // CHECK:STDOUT: %MulAssignWith.type.e40: type = facet_type <@MulAssignWith, @MulAssignWith(%i64)> [concrete] @@ -2889,9 +2889,9 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Cpp.long_long.as.MulAssignWith.impl.Op.407d6d.1: %Cpp.long_long.as.MulAssignWith.impl.Op.type.31c331.1 = struct_value () [concrete] // CHECK:STDOUT: %Cpp.long_long.as.MulAssignWith.impl.Op.type.31c331.2: type = fn_type @Cpp.long_long.as.MulAssignWith.impl.Op.1, @Cpp.long_long.as.MulAssignWith.impl(%ImplicitAs.facet.cee) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.MulAssignWith.impl.Op.407d6d.2: %Cpp.long_long.as.MulAssignWith.impl.Op.type.31c331.2 = struct_value () [concrete] -// CHECK:STDOUT: %MulAssignWith.facet: %MulAssignWith.type.e40 = facet_value %Cpp.long_long, (%MulAssignWith.impl_witness.fd5) [concrete] -// CHECK:STDOUT: %MulAssignWith.WithSelf.Op.type.51d: type = fn_type @MulAssignWith.WithSelf.Op, @MulAssignWith.WithSelf(%i64, %MulAssignWith.facet) [concrete] -// CHECK:STDOUT: %.a7c: type = fn_type_with_self_type %MulAssignWith.WithSelf.Op.type.51d, %MulAssignWith.facet [concrete] +// CHECK:STDOUT: %MulAssignWith.facet.ea8: %MulAssignWith.type.e40 = facet_value %Cpp.long_long, (%MulAssignWith.impl_witness.fd5) [concrete] +// CHECK:STDOUT: %MulAssignWith.WithSelf.Op.type.51d: type = fn_type @MulAssignWith.WithSelf.Op, @MulAssignWith.WithSelf(%i64, %MulAssignWith.facet.ea8) [concrete] +// CHECK:STDOUT: %.a7c: type = fn_type_with_self_type %MulAssignWith.WithSelf.Op.type.51d, %MulAssignWith.facet.ea8 [concrete] // CHECK:STDOUT: %Cpp.long_long.as.MulAssignWith.impl.Op.specific_fn.da4954.1: = specific_function %Cpp.long_long.as.MulAssignWith.impl.Op.407d6d.2, @Cpp.long_long.as.MulAssignWith.impl.Op.1(%ImplicitAs.facet.cee) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.MulAssignWith.impl.Op.specific_fn.da4954.2: = specific_function %Cpp.long_long.as.MulAssignWith.impl.Op.407d6d.1, @Cpp.long_long.as.MulAssignWith.impl.Op.2(%ImplicitAs.facet.cee) [concrete] // CHECK:STDOUT: %DivAssignWith.type.511: type = facet_type <@DivAssignWith, @DivAssignWith(%i64)> [concrete] @@ -2904,9 +2904,9 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Cpp.long_long.as.DivAssignWith.impl.Op.5f629f.1: %Cpp.long_long.as.DivAssignWith.impl.Op.type.35f78a.1 = struct_value () [concrete] // CHECK:STDOUT: %Cpp.long_long.as.DivAssignWith.impl.Op.type.35f78a.2: type = fn_type @Cpp.long_long.as.DivAssignWith.impl.Op.1, @Cpp.long_long.as.DivAssignWith.impl(%ImplicitAs.facet.cee) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.DivAssignWith.impl.Op.5f629f.2: %Cpp.long_long.as.DivAssignWith.impl.Op.type.35f78a.2 = struct_value () [concrete] -// CHECK:STDOUT: %DivAssignWith.facet: %DivAssignWith.type.511 = facet_value %Cpp.long_long, (%DivAssignWith.impl_witness.b7a) [concrete] -// CHECK:STDOUT: %DivAssignWith.WithSelf.Op.type.a7c: type = fn_type @DivAssignWith.WithSelf.Op, @DivAssignWith.WithSelf(%i64, %DivAssignWith.facet) [concrete] -// CHECK:STDOUT: %.9e9: type = fn_type_with_self_type %DivAssignWith.WithSelf.Op.type.a7c, %DivAssignWith.facet [concrete] +// CHECK:STDOUT: %DivAssignWith.facet.7c8: %DivAssignWith.type.511 = facet_value %Cpp.long_long, (%DivAssignWith.impl_witness.b7a) [concrete] +// CHECK:STDOUT: %DivAssignWith.WithSelf.Op.type.a7c: type = fn_type @DivAssignWith.WithSelf.Op, @DivAssignWith.WithSelf(%i64, %DivAssignWith.facet.7c8) [concrete] +// CHECK:STDOUT: %.9e9: type = fn_type_with_self_type %DivAssignWith.WithSelf.Op.type.a7c, %DivAssignWith.facet.7c8 [concrete] // CHECK:STDOUT: %Cpp.long_long.as.DivAssignWith.impl.Op.specific_fn.b4ca85.1: = specific_function %Cpp.long_long.as.DivAssignWith.impl.Op.5f629f.2, @Cpp.long_long.as.DivAssignWith.impl.Op.1(%ImplicitAs.facet.cee) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.DivAssignWith.impl.Op.specific_fn.b4ca85.2: = specific_function %Cpp.long_long.as.DivAssignWith.impl.Op.5f629f.1, @Cpp.long_long.as.DivAssignWith.impl.Op.2(%ImplicitAs.facet.cee) [concrete] // CHECK:STDOUT: %ModAssignWith.type.2c3: type = facet_type <@ModAssignWith, @ModAssignWith(%i64)> [concrete] @@ -2919,9 +2919,9 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Cpp.long_long.as.ModAssignWith.impl.Op.6cec08.1: %Cpp.long_long.as.ModAssignWith.impl.Op.type.710c53.1 = struct_value () [concrete] // CHECK:STDOUT: %Cpp.long_long.as.ModAssignWith.impl.Op.type.710c53.2: type = fn_type @Cpp.long_long.as.ModAssignWith.impl.Op.1, @Cpp.long_long.as.ModAssignWith.impl(%ImplicitAs.facet.cee) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.ModAssignWith.impl.Op.6cec08.2: %Cpp.long_long.as.ModAssignWith.impl.Op.type.710c53.2 = struct_value () [concrete] -// CHECK:STDOUT: %ModAssignWith.facet: %ModAssignWith.type.2c3 = facet_value %Cpp.long_long, (%ModAssignWith.impl_witness.746) [concrete] -// CHECK:STDOUT: %ModAssignWith.WithSelf.Op.type.2ef: type = fn_type @ModAssignWith.WithSelf.Op, @ModAssignWith.WithSelf(%i64, %ModAssignWith.facet) [concrete] -// CHECK:STDOUT: %.35e: type = fn_type_with_self_type %ModAssignWith.WithSelf.Op.type.2ef, %ModAssignWith.facet [concrete] +// CHECK:STDOUT: %ModAssignWith.facet.9ba: %ModAssignWith.type.2c3 = facet_value %Cpp.long_long, (%ModAssignWith.impl_witness.746) [concrete] +// CHECK:STDOUT: %ModAssignWith.WithSelf.Op.type.2ef: type = fn_type @ModAssignWith.WithSelf.Op, @ModAssignWith.WithSelf(%i64, %ModAssignWith.facet.9ba) [concrete] +// CHECK:STDOUT: %.35e: type = fn_type_with_self_type %ModAssignWith.WithSelf.Op.type.2ef, %ModAssignWith.facet.9ba [concrete] // CHECK:STDOUT: %Cpp.long_long.as.ModAssignWith.impl.Op.specific_fn.49ce9c.1: = specific_function %Cpp.long_long.as.ModAssignWith.impl.Op.6cec08.2, @Cpp.long_long.as.ModAssignWith.impl.Op.1(%ImplicitAs.facet.cee) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.ModAssignWith.impl.Op.specific_fn.49ce9c.2: = specific_function %Cpp.long_long.as.ModAssignWith.impl.Op.6cec08.1, @Cpp.long_long.as.ModAssignWith.impl.Op.2(%ImplicitAs.facet.cee) [concrete] // CHECK:STDOUT: %BitAndAssignWith.type.8af: type = facet_type <@BitAndAssignWith, @BitAndAssignWith(%i64)> [concrete] @@ -2934,9 +2934,9 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Cpp.long_long.as.BitAndAssignWith.impl.Op.98a24e.1: %Cpp.long_long.as.BitAndAssignWith.impl.Op.type.ef8d37.1 = struct_value () [concrete] // CHECK:STDOUT: %Cpp.long_long.as.BitAndAssignWith.impl.Op.type.ef8d37.2: type = fn_type @Cpp.long_long.as.BitAndAssignWith.impl.Op.1, @Cpp.long_long.as.BitAndAssignWith.impl(%ImplicitAs.facet.cee) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.BitAndAssignWith.impl.Op.98a24e.2: %Cpp.long_long.as.BitAndAssignWith.impl.Op.type.ef8d37.2 = struct_value () [concrete] -// CHECK:STDOUT: %BitAndAssignWith.facet: %BitAndAssignWith.type.8af = facet_value %Cpp.long_long, (%BitAndAssignWith.impl_witness.a30) [concrete] -// CHECK:STDOUT: %BitAndAssignWith.WithSelf.Op.type.4de: type = fn_type @BitAndAssignWith.WithSelf.Op, @BitAndAssignWith.WithSelf(%i64, %BitAndAssignWith.facet) [concrete] -// CHECK:STDOUT: %.6cf: type = fn_type_with_self_type %BitAndAssignWith.WithSelf.Op.type.4de, %BitAndAssignWith.facet [concrete] +// CHECK:STDOUT: %BitAndAssignWith.facet.a43: %BitAndAssignWith.type.8af = facet_value %Cpp.long_long, (%BitAndAssignWith.impl_witness.a30) [concrete] +// CHECK:STDOUT: %BitAndAssignWith.WithSelf.Op.type.4de: type = fn_type @BitAndAssignWith.WithSelf.Op, @BitAndAssignWith.WithSelf(%i64, %BitAndAssignWith.facet.a43) [concrete] +// CHECK:STDOUT: %.6cf: type = fn_type_with_self_type %BitAndAssignWith.WithSelf.Op.type.4de, %BitAndAssignWith.facet.a43 [concrete] // CHECK:STDOUT: %Cpp.long_long.as.BitAndAssignWith.impl.Op.specific_fn.2fa8b1.1: = specific_function %Cpp.long_long.as.BitAndAssignWith.impl.Op.98a24e.2, @Cpp.long_long.as.BitAndAssignWith.impl.Op.1(%ImplicitAs.facet.cee) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.BitAndAssignWith.impl.Op.specific_fn.2fa8b1.2: = specific_function %Cpp.long_long.as.BitAndAssignWith.impl.Op.98a24e.1, @Cpp.long_long.as.BitAndAssignWith.impl.Op.2(%ImplicitAs.facet.cee) [concrete] // CHECK:STDOUT: %BitOrAssignWith.type.172: type = facet_type <@BitOrAssignWith, @BitOrAssignWith(%i64)> [concrete] @@ -2949,9 +2949,9 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Cpp.long_long.as.BitOrAssignWith.impl.Op.efcdd8.1: %Cpp.long_long.as.BitOrAssignWith.impl.Op.type.a11270.1 = struct_value () [concrete] // CHECK:STDOUT: %Cpp.long_long.as.BitOrAssignWith.impl.Op.type.a11270.2: type = fn_type @Cpp.long_long.as.BitOrAssignWith.impl.Op.1, @Cpp.long_long.as.BitOrAssignWith.impl(%ImplicitAs.facet.cee) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.BitOrAssignWith.impl.Op.efcdd8.2: %Cpp.long_long.as.BitOrAssignWith.impl.Op.type.a11270.2 = struct_value () [concrete] -// CHECK:STDOUT: %BitOrAssignWith.facet: %BitOrAssignWith.type.172 = facet_value %Cpp.long_long, (%BitOrAssignWith.impl_witness.f30) [concrete] -// CHECK:STDOUT: %BitOrAssignWith.WithSelf.Op.type.3d7: type = fn_type @BitOrAssignWith.WithSelf.Op, @BitOrAssignWith.WithSelf(%i64, %BitOrAssignWith.facet) [concrete] -// CHECK:STDOUT: %.49d: type = fn_type_with_self_type %BitOrAssignWith.WithSelf.Op.type.3d7, %BitOrAssignWith.facet [concrete] +// CHECK:STDOUT: %BitOrAssignWith.facet.6e0: %BitOrAssignWith.type.172 = facet_value %Cpp.long_long, (%BitOrAssignWith.impl_witness.f30) [concrete] +// CHECK:STDOUT: %BitOrAssignWith.WithSelf.Op.type.3d7: type = fn_type @BitOrAssignWith.WithSelf.Op, @BitOrAssignWith.WithSelf(%i64, %BitOrAssignWith.facet.6e0) [concrete] +// CHECK:STDOUT: %.49d: type = fn_type_with_self_type %BitOrAssignWith.WithSelf.Op.type.3d7, %BitOrAssignWith.facet.6e0 [concrete] // CHECK:STDOUT: %Cpp.long_long.as.BitOrAssignWith.impl.Op.specific_fn.bee85f.1: = specific_function %Cpp.long_long.as.BitOrAssignWith.impl.Op.efcdd8.2, @Cpp.long_long.as.BitOrAssignWith.impl.Op.1(%ImplicitAs.facet.cee) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.BitOrAssignWith.impl.Op.specific_fn.bee85f.2: = specific_function %Cpp.long_long.as.BitOrAssignWith.impl.Op.efcdd8.1, @Cpp.long_long.as.BitOrAssignWith.impl.Op.2(%ImplicitAs.facet.cee) [concrete] // CHECK:STDOUT: %BitXorAssignWith.type.2c8: type = facet_type <@BitXorAssignWith, @BitXorAssignWith(%i64)> [concrete] @@ -2964,9 +2964,9 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Cpp.long_long.as.BitXorAssignWith.impl.Op.427b1c.1: %Cpp.long_long.as.BitXorAssignWith.impl.Op.type.533a57.1 = struct_value () [concrete] // CHECK:STDOUT: %Cpp.long_long.as.BitXorAssignWith.impl.Op.type.533a57.2: type = fn_type @Cpp.long_long.as.BitXorAssignWith.impl.Op.1, @Cpp.long_long.as.BitXorAssignWith.impl(%ImplicitAs.facet.cee) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.BitXorAssignWith.impl.Op.427b1c.2: %Cpp.long_long.as.BitXorAssignWith.impl.Op.type.533a57.2 = struct_value () [concrete] -// CHECK:STDOUT: %BitXorAssignWith.facet: %BitXorAssignWith.type.2c8 = facet_value %Cpp.long_long, (%BitXorAssignWith.impl_witness.637) [concrete] -// CHECK:STDOUT: %BitXorAssignWith.WithSelf.Op.type.b41: type = fn_type @BitXorAssignWith.WithSelf.Op, @BitXorAssignWith.WithSelf(%i64, %BitXorAssignWith.facet) [concrete] -// CHECK:STDOUT: %.cd3: type = fn_type_with_self_type %BitXorAssignWith.WithSelf.Op.type.b41, %BitXorAssignWith.facet [concrete] +// CHECK:STDOUT: %BitXorAssignWith.facet.c45: %BitXorAssignWith.type.2c8 = facet_value %Cpp.long_long, (%BitXorAssignWith.impl_witness.637) [concrete] +// CHECK:STDOUT: %BitXorAssignWith.WithSelf.Op.type.b41: type = fn_type @BitXorAssignWith.WithSelf.Op, @BitXorAssignWith.WithSelf(%i64, %BitXorAssignWith.facet.c45) [concrete] +// CHECK:STDOUT: %.cd3: type = fn_type_with_self_type %BitXorAssignWith.WithSelf.Op.type.b41, %BitXorAssignWith.facet.c45 [concrete] // CHECK:STDOUT: %Cpp.long_long.as.BitXorAssignWith.impl.Op.specific_fn.659754.1: = specific_function %Cpp.long_long.as.BitXorAssignWith.impl.Op.427b1c.2, @Cpp.long_long.as.BitXorAssignWith.impl.Op.1(%ImplicitAs.facet.cee) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.BitXorAssignWith.impl.Op.specific_fn.659754.2: = specific_function %Cpp.long_long.as.BitXorAssignWith.impl.Op.427b1c.1, @Cpp.long_long.as.BitXorAssignWith.impl.Op.2(%ImplicitAs.facet.cee) [concrete] // CHECK:STDOUT: %LeftShiftAssignWith.type.b97: type = facet_type <@LeftShiftAssignWith, @LeftShiftAssignWith(%i64)> [concrete] @@ -2979,9 +2979,9 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Cpp.long_long.as.LeftShiftAssignWith.impl.Op.3761f5.1: %Cpp.long_long.as.LeftShiftAssignWith.impl.Op.type.b8e2a1.1 = struct_value () [concrete] // CHECK:STDOUT: %Cpp.long_long.as.LeftShiftAssignWith.impl.Op.type.b8e2a1.2: type = fn_type @Cpp.long_long.as.LeftShiftAssignWith.impl.Op.1, @Cpp.long_long.as.LeftShiftAssignWith.impl(%ImplicitAs.facet.cee) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.LeftShiftAssignWith.impl.Op.3761f5.2: %Cpp.long_long.as.LeftShiftAssignWith.impl.Op.type.b8e2a1.2 = struct_value () [concrete] -// CHECK:STDOUT: %LeftShiftAssignWith.facet: %LeftShiftAssignWith.type.b97 = facet_value %Cpp.long_long, (%LeftShiftAssignWith.impl_witness.cea) [concrete] -// CHECK:STDOUT: %LeftShiftAssignWith.WithSelf.Op.type.726: type = fn_type @LeftShiftAssignWith.WithSelf.Op, @LeftShiftAssignWith.WithSelf(%i64, %LeftShiftAssignWith.facet) [concrete] -// CHECK:STDOUT: %.90e: type = fn_type_with_self_type %LeftShiftAssignWith.WithSelf.Op.type.726, %LeftShiftAssignWith.facet [concrete] +// CHECK:STDOUT: %LeftShiftAssignWith.facet.77c: %LeftShiftAssignWith.type.b97 = facet_value %Cpp.long_long, (%LeftShiftAssignWith.impl_witness.cea) [concrete] +// CHECK:STDOUT: %LeftShiftAssignWith.WithSelf.Op.type.726: type = fn_type @LeftShiftAssignWith.WithSelf.Op, @LeftShiftAssignWith.WithSelf(%i64, %LeftShiftAssignWith.facet.77c) [concrete] +// CHECK:STDOUT: %.90e: type = fn_type_with_self_type %LeftShiftAssignWith.WithSelf.Op.type.726, %LeftShiftAssignWith.facet.77c [concrete] // CHECK:STDOUT: %Cpp.long_long.as.LeftShiftAssignWith.impl.Op.specific_fn.ab2c2b.1: = specific_function %Cpp.long_long.as.LeftShiftAssignWith.impl.Op.3761f5.2, @Cpp.long_long.as.LeftShiftAssignWith.impl.Op.1(%ImplicitAs.facet.cee) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.LeftShiftAssignWith.impl.Op.specific_fn.ab2c2b.2: = specific_function %Cpp.long_long.as.LeftShiftAssignWith.impl.Op.3761f5.1, @Cpp.long_long.as.LeftShiftAssignWith.impl.Op.2(%ImplicitAs.facet.cee) [concrete] // CHECK:STDOUT: %RightShiftAssignWith.type.721: type = facet_type <@RightShiftAssignWith, @RightShiftAssignWith(%i64)> [concrete] @@ -2994,9 +2994,9 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Cpp.long_long.as.RightShiftAssignWith.impl.Op.be7a73.1: %Cpp.long_long.as.RightShiftAssignWith.impl.Op.type.71dc97.1 = struct_value () [concrete] // CHECK:STDOUT: %Cpp.long_long.as.RightShiftAssignWith.impl.Op.type.71dc97.2: type = fn_type @Cpp.long_long.as.RightShiftAssignWith.impl.Op.1, @Cpp.long_long.as.RightShiftAssignWith.impl(%ImplicitAs.facet.cee) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.RightShiftAssignWith.impl.Op.be7a73.2: %Cpp.long_long.as.RightShiftAssignWith.impl.Op.type.71dc97.2 = struct_value () [concrete] -// CHECK:STDOUT: %RightShiftAssignWith.facet: %RightShiftAssignWith.type.721 = facet_value %Cpp.long_long, (%RightShiftAssignWith.impl_witness.cea) [concrete] -// CHECK:STDOUT: %RightShiftAssignWith.WithSelf.Op.type.1c1: type = fn_type @RightShiftAssignWith.WithSelf.Op, @RightShiftAssignWith.WithSelf(%i64, %RightShiftAssignWith.facet) [concrete] -// CHECK:STDOUT: %.ec8: type = fn_type_with_self_type %RightShiftAssignWith.WithSelf.Op.type.1c1, %RightShiftAssignWith.facet [concrete] +// CHECK:STDOUT: %RightShiftAssignWith.facet.b25: %RightShiftAssignWith.type.721 = facet_value %Cpp.long_long, (%RightShiftAssignWith.impl_witness.cea) [concrete] +// CHECK:STDOUT: %RightShiftAssignWith.WithSelf.Op.type.1c1: type = fn_type @RightShiftAssignWith.WithSelf.Op, @RightShiftAssignWith.WithSelf(%i64, %RightShiftAssignWith.facet.b25) [concrete] +// CHECK:STDOUT: %.ec8: type = fn_type_with_self_type %RightShiftAssignWith.WithSelf.Op.type.1c1, %RightShiftAssignWith.facet.b25 [concrete] // CHECK:STDOUT: %Cpp.long_long.as.RightShiftAssignWith.impl.Op.specific_fn.3074f6.1: = specific_function %Cpp.long_long.as.RightShiftAssignWith.impl.Op.be7a73.2, @Cpp.long_long.as.RightShiftAssignWith.impl.Op.1(%ImplicitAs.facet.cee) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.RightShiftAssignWith.impl.Op.specific_fn.3074f6.2: = specific_function %Cpp.long_long.as.RightShiftAssignWith.impl.Op.be7a73.1, @Cpp.long_long.as.RightShiftAssignWith.impl.Op.2(%ImplicitAs.facet.cee) [concrete] // CHECK:STDOUT: %Destroy.Op.type.bae255.2: type = fn_type @Destroy.Op.loc9_3.2 [concrete] @@ -3344,9 +3344,9 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Cpp.long_long.as.AddAssignWith.impl.Op.65d685.1: %Cpp.long_long.as.AddAssignWith.impl.Op.type.9da307.1 = struct_value () [concrete] // CHECK:STDOUT: %Cpp.long_long.as.AddAssignWith.impl.Op.type.9da307.2: type = fn_type @Cpp.long_long.as.AddAssignWith.impl.Op.1, @Cpp.long_long.as.AddAssignWith.impl(%ImplicitAs.facet) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.AddAssignWith.impl.Op.65d685.2: %Cpp.long_long.as.AddAssignWith.impl.Op.type.9da307.2 = struct_value () [concrete] -// CHECK:STDOUT: %AddAssignWith.facet: %AddAssignWith.type.761 = facet_value %Cpp.long_long, (%AddAssignWith.impl_witness.d24) [concrete] -// CHECK:STDOUT: %AddAssignWith.WithSelf.Op.type.4c6: type = fn_type @AddAssignWith.WithSelf.Op, @AddAssignWith.WithSelf(Core.IntLiteral, %AddAssignWith.facet) [concrete] -// CHECK:STDOUT: %.2d5: type = fn_type_with_self_type %AddAssignWith.WithSelf.Op.type.4c6, %AddAssignWith.facet [concrete] +// CHECK:STDOUT: %AddAssignWith.facet.fc3: %AddAssignWith.type.761 = facet_value %Cpp.long_long, (%AddAssignWith.impl_witness.d24) [concrete] +// CHECK:STDOUT: %AddAssignWith.WithSelf.Op.type.4c6: type = fn_type @AddAssignWith.WithSelf.Op, @AddAssignWith.WithSelf(Core.IntLiteral, %AddAssignWith.facet.fc3) [concrete] +// CHECK:STDOUT: %.2d5: type = fn_type_with_self_type %AddAssignWith.WithSelf.Op.type.4c6, %AddAssignWith.facet.fc3 [concrete] // CHECK:STDOUT: %Cpp.long_long.as.AddAssignWith.impl.Op.specific_fn.616d71.1: = specific_function %Cpp.long_long.as.AddAssignWith.impl.Op.65d685.2, @Cpp.long_long.as.AddAssignWith.impl.Op.1(%ImplicitAs.facet) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.AddAssignWith.impl.Op.specific_fn.616d71.2: = specific_function %Cpp.long_long.as.AddAssignWith.impl.Op.65d685.1, @Cpp.long_long.as.AddAssignWith.impl.Op.2(%ImplicitAs.facet) [concrete] // CHECK:STDOUT: %Destroy.Op.type.bae255.2: type = fn_type @Destroy.Op.loc8_3.2 [concrete] @@ -3466,9 +3466,9 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Cpp.long_long.as.AddAssignWith.impl.Op.3aaab8.1: %Cpp.long_long.as.AddAssignWith.impl.Op.type.61f9d4.1 = struct_value () [concrete] // CHECK:STDOUT: %Cpp.long_long.as.AddAssignWith.impl.Op.type.61f9d4.2: type = fn_type @Cpp.long_long.as.AddAssignWith.impl.Op.1, @Cpp.long_long.as.AddAssignWith.impl(%ImplicitAs.facet.cee) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.AddAssignWith.impl.Op.3aaab8.2: %Cpp.long_long.as.AddAssignWith.impl.Op.type.61f9d4.2 = struct_value () [concrete] -// CHECK:STDOUT: %AddAssignWith.facet: %AddAssignWith.type.d84 = facet_value %Cpp.long_long, (%AddAssignWith.impl_witness.c98) [concrete] -// CHECK:STDOUT: %AddAssignWith.WithSelf.Op.type.9f5: type = fn_type @AddAssignWith.WithSelf.Op, @AddAssignWith.WithSelf(%i64, %AddAssignWith.facet) [concrete] -// CHECK:STDOUT: %.605: type = fn_type_with_self_type %AddAssignWith.WithSelf.Op.type.9f5, %AddAssignWith.facet [concrete] +// CHECK:STDOUT: %AddAssignWith.facet.0dd: %AddAssignWith.type.d84 = facet_value %Cpp.long_long, (%AddAssignWith.impl_witness.c98) [concrete] +// CHECK:STDOUT: %AddAssignWith.WithSelf.Op.type.9f5: type = fn_type @AddAssignWith.WithSelf.Op, @AddAssignWith.WithSelf(%i64, %AddAssignWith.facet.0dd) [concrete] +// CHECK:STDOUT: %.605: type = fn_type_with_self_type %AddAssignWith.WithSelf.Op.type.9f5, %AddAssignWith.facet.0dd [concrete] // CHECK:STDOUT: %Cpp.long_long.as.AddAssignWith.impl.Op.specific_fn.47f55f.1: = specific_function %Cpp.long_long.as.AddAssignWith.impl.Op.3aaab8.2, @Cpp.long_long.as.AddAssignWith.impl.Op.1(%ImplicitAs.facet.cee) [concrete] // CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.479: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs.WithSelf(%Cpp.long_long, %ImplicitAs.facet.cee) [concrete] // CHECK:STDOUT: %.48b: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.479, %ImplicitAs.facet.cee [concrete] diff --git a/toolchain/check/testdata/interop/cpp/primitive_types/void_pointer.carbon b/toolchain/check/testdata/interop/cpp/primitive_types/void_pointer.carbon index a5bb88632c91..7e4d8ca01a1f 100644 --- a/toolchain/check/testdata/interop/cpp/primitive_types/void_pointer.carbon +++ b/toolchain/check/testdata/interop/cpp/primitive_types/void_pointer.carbon @@ -151,9 +151,9 @@ fn F(input: Cpp.void*) { // CHECK:STDOUT: %ImplicitAs.impl_witness.429: = impl_witness imports.%ImplicitAs.impl_witness_table.e02, @ptr.as.ImplicitAs.impl.1b5(%S) [concrete] // CHECK:STDOUT: %ptr.as.ImplicitAs.impl.Convert.type.31c: type = fn_type @ptr.as.ImplicitAs.impl.Convert.1, @ptr.as.ImplicitAs.impl.1b5(%S) [concrete] // CHECK:STDOUT: %ptr.as.ImplicitAs.impl.Convert.b9d: %ptr.as.ImplicitAs.impl.Convert.type.31c = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.02d = facet_value %ptr.5c7, (%ImplicitAs.impl_witness.429) [concrete] -// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.068: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs.WithSelf(%ptr.874, %ImplicitAs.facet) [concrete] -// CHECK:STDOUT: %.d36: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.068, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.ed7: %ImplicitAs.type.02d = facet_value %ptr.5c7, (%ImplicitAs.impl_witness.429) [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.068: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs.WithSelf(%ptr.874, %ImplicitAs.facet.ed7) [concrete] +// CHECK:STDOUT: %.d36: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.068, %ImplicitAs.facet.ed7 [concrete] // CHECK:STDOUT: %ptr.as.ImplicitAs.impl.Convert.specific_fn.9f6: = specific_function %ptr.as.ImplicitAs.impl.Convert.b9d, @ptr.as.ImplicitAs.impl.Convert.1(%S) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -205,9 +205,9 @@ fn F(input: Cpp.void*) { // CHECK:STDOUT: %ImplicitAs.impl_witness.f70: = impl_witness imports.%ImplicitAs.impl_witness_table.e02, @ptr.as.ImplicitAs.impl.1b5(%C) [concrete] // CHECK:STDOUT: %ptr.as.ImplicitAs.impl.Convert.type.791: type = fn_type @ptr.as.ImplicitAs.impl.Convert.1, @ptr.as.ImplicitAs.impl.1b5(%C) [concrete] // CHECK:STDOUT: %ptr.as.ImplicitAs.impl.Convert.af8: %ptr.as.ImplicitAs.impl.Convert.type.791 = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.02d = facet_value %ptr.31e, (%ImplicitAs.impl_witness.f70) [concrete] -// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.1e1: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs.WithSelf(%ptr.874, %ImplicitAs.facet) [concrete] -// CHECK:STDOUT: %.41e: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.1e1, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.bcb: %ImplicitAs.type.02d = facet_value %ptr.31e, (%ImplicitAs.impl_witness.f70) [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.1e1: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs.WithSelf(%ptr.874, %ImplicitAs.facet.bcb) [concrete] +// CHECK:STDOUT: %.41e: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.1e1, %ImplicitAs.facet.bcb [concrete] // CHECK:STDOUT: %ptr.as.ImplicitAs.impl.Convert.specific_fn.a56: = specific_function %ptr.as.ImplicitAs.impl.Convert.af8, @ptr.as.ImplicitAs.impl.Convert.1(%C) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -261,14 +261,14 @@ fn F(input: Cpp.void*) { // CHECK:STDOUT: %ptr.as.ImplicitAs.impl.Convert.type.502: type = fn_type @ptr.as.ImplicitAs.impl.Convert.1, @ptr.as.ImplicitAs.impl.1b5(%T.67d) [symbolic] // CHECK:STDOUT: %ptr.as.ImplicitAs.impl.Convert.02e: %ptr.as.ImplicitAs.impl.Convert.type.502 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.429: = impl_witness imports.%ImplicitAs.impl_witness_table.e02, @ptr.as.ImplicitAs.impl.1b5(%S) [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.02d = facet_value %ptr.5c7, (%ImplicitAs.impl_witness.429) [concrete] -// CHECK:STDOUT: %As.impl_witness.58f: = impl_witness imports.%As.impl_witness_table.0dc, @T.as_type.as.As.impl(%ptr.874, %ImplicitAs.facet) [concrete] -// CHECK:STDOUT: %T.as_type.as.As.impl.Convert.type.d89: type = fn_type @T.as_type.as.As.impl.Convert, @T.as_type.as.As.impl(%ptr.874, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.ed7: %ImplicitAs.type.02d = facet_value %ptr.5c7, (%ImplicitAs.impl_witness.429) [concrete] +// CHECK:STDOUT: %As.impl_witness.58f: = impl_witness imports.%As.impl_witness_table.0dc, @T.as_type.as.As.impl(%ptr.874, %ImplicitAs.facet.ed7) [concrete] +// CHECK:STDOUT: %T.as_type.as.As.impl.Convert.type.d89: type = fn_type @T.as_type.as.As.impl.Convert, @T.as_type.as.As.impl(%ptr.874, %ImplicitAs.facet.ed7) [concrete] // CHECK:STDOUT: %T.as_type.as.As.impl.Convert.e8b: %T.as_type.as.As.impl.Convert.type.d89 = struct_value () [concrete] // CHECK:STDOUT: %As.facet: %As.type.d24 = facet_value %ptr.5c7, (%As.impl_witness.58f) [concrete] // CHECK:STDOUT: %As.WithSelf.Convert.type.2d8: type = fn_type @As.WithSelf.Convert, @As.WithSelf(%ptr.874, %As.facet) [concrete] // CHECK:STDOUT: %.187: type = fn_type_with_self_type %As.WithSelf.Convert.type.2d8, %As.facet [concrete] -// CHECK:STDOUT: %T.as_type.as.As.impl.Convert.specific_fn: = specific_function %T.as_type.as.As.impl.Convert.e8b, @T.as_type.as.As.impl.Convert(%ptr.874, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %T.as_type.as.As.impl.Convert.specific_fn: = specific_function %T.as_type.as.As.impl.Convert.e8b, @T.as_type.as.As.impl.Convert(%ptr.874, %ImplicitAs.facet.ed7) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -295,7 +295,7 @@ fn F(input: Cpp.void*) { // CHECK:STDOUT: %ptr.loc10_46: type = ptr_type %void.ref.loc10_41 [concrete = constants.%ptr.874] // CHECK:STDOUT: %impl.elem0: %.187 = impl_witness_access constants.%As.impl_witness.58f, element0 [concrete = constants.%T.as_type.as.As.impl.Convert.e8b] // CHECK:STDOUT: %bound_method.loc10_35.1: = bound_method %input.ref, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @T.as_type.as.As.impl.Convert(constants.%ptr.874, constants.%ImplicitAs.facet) [concrete = constants.%T.as_type.as.As.impl.Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @T.as_type.as.As.impl.Convert(constants.%ptr.874, constants.%ImplicitAs.facet.ed7) [concrete = constants.%T.as_type.as.As.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc10_35.2: = bound_method %input.ref, %specific_fn // CHECK:STDOUT: %T.as_type.as.As.impl.Convert.call: init %ptr.874 = call %bound_method.loc10_35.2(%input.ref) // CHECK:STDOUT: %.loc10_35.1: %ptr.874 = value_of_initializer %T.as_type.as.As.impl.Convert.call @@ -328,14 +328,14 @@ fn F(input: Cpp.void*) { // CHECK:STDOUT: %ptr.as.ImplicitAs.impl.Convert.type.502: type = fn_type @ptr.as.ImplicitAs.impl.Convert.1, @ptr.as.ImplicitAs.impl.1b5(%T.67d) [symbolic] // CHECK:STDOUT: %ptr.as.ImplicitAs.impl.Convert.02e: %ptr.as.ImplicitAs.impl.Convert.type.502 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.f70: = impl_witness imports.%ImplicitAs.impl_witness_table.e02, @ptr.as.ImplicitAs.impl.1b5(%C) [concrete] -// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.02d = facet_value %ptr.31e, (%ImplicitAs.impl_witness.f70) [concrete] -// CHECK:STDOUT: %As.impl_witness.a9a: = impl_witness imports.%As.impl_witness_table.0dc, @T.as_type.as.As.impl(%ptr.874, %ImplicitAs.facet) [concrete] -// CHECK:STDOUT: %T.as_type.as.As.impl.Convert.type.758: type = fn_type @T.as_type.as.As.impl.Convert, @T.as_type.as.As.impl(%ptr.874, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %ImplicitAs.facet.bcb: %ImplicitAs.type.02d = facet_value %ptr.31e, (%ImplicitAs.impl_witness.f70) [concrete] +// CHECK:STDOUT: %As.impl_witness.a9a: = impl_witness imports.%As.impl_witness_table.0dc, @T.as_type.as.As.impl(%ptr.874, %ImplicitAs.facet.bcb) [concrete] +// CHECK:STDOUT: %T.as_type.as.As.impl.Convert.type.758: type = fn_type @T.as_type.as.As.impl.Convert, @T.as_type.as.As.impl(%ptr.874, %ImplicitAs.facet.bcb) [concrete] // CHECK:STDOUT: %T.as_type.as.As.impl.Convert.57a: %T.as_type.as.As.impl.Convert.type.758 = struct_value () [concrete] // CHECK:STDOUT: %As.facet: %As.type.d24 = facet_value %ptr.31e, (%As.impl_witness.a9a) [concrete] // CHECK:STDOUT: %As.WithSelf.Convert.type.dc8: type = fn_type @As.WithSelf.Convert, @As.WithSelf(%ptr.874, %As.facet) [concrete] // CHECK:STDOUT: %.85e: type = fn_type_with_self_type %As.WithSelf.Convert.type.dc8, %As.facet [concrete] -// CHECK:STDOUT: %T.as_type.as.As.impl.Convert.specific_fn: = specific_function %T.as_type.as.As.impl.Convert.57a, @T.as_type.as.As.impl.Convert(%ptr.874, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %T.as_type.as.As.impl.Convert.specific_fn: = specific_function %T.as_type.as.As.impl.Convert.57a, @T.as_type.as.As.impl.Convert(%ptr.874, %ImplicitAs.facet.bcb) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -360,7 +360,7 @@ fn F(input: Cpp.void*) { // CHECK:STDOUT: %ptr.loc10_46: type = ptr_type %void.ref.loc10_41 [concrete = constants.%ptr.874] // CHECK:STDOUT: %impl.elem0: %.85e = impl_witness_access constants.%As.impl_witness.a9a, element0 [concrete = constants.%T.as_type.as.As.impl.Convert.57a] // CHECK:STDOUT: %bound_method.loc10_35.1: = bound_method %input.ref, %impl.elem0 -// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @T.as_type.as.As.impl.Convert(constants.%ptr.874, constants.%ImplicitAs.facet) [concrete = constants.%T.as_type.as.As.impl.Convert.specific_fn] +// CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @T.as_type.as.As.impl.Convert(constants.%ptr.874, constants.%ImplicitAs.facet.bcb) [concrete = constants.%T.as_type.as.As.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc10_35.2: = bound_method %input.ref, %specific_fn // CHECK:STDOUT: %T.as_type.as.As.impl.Convert.call: init %ptr.874 = call %bound_method.loc10_35.2(%input.ref) // CHECK:STDOUT: %.loc10_35.1: %ptr.874 = value_of_initializer %T.as_type.as.As.impl.Convert.call diff --git a/toolchain/check/thunk.cpp b/toolchain/check/thunk.cpp index 2eaf74e0fdef..0f3cd074a2c5 100644 --- a/toolchain/check/thunk.cpp +++ b/toolchain/check/thunk.cpp @@ -29,6 +29,7 @@ #include "toolchain/sem_ir/ids.h" #include "toolchain/sem_ir/inst.h" #include "toolchain/sem_ir/pattern.h" +#include "toolchain/sem_ir/thunk.h" #include "toolchain/sem_ir/typed_insts.h" namespace Carbon::Check { @@ -489,12 +490,17 @@ auto BuildThunk(Context& context, SemIR::FunctionId signature_id, // We can't use the function directly. Build a thunk. // TODO: Check for and diagnose obvious reasons why this will fail, such as // arity mismatch, before trying to build the thunk. - auto [function_id, thunk_id] = + auto [function_id, thunk_inst_id] = CloneFunctionDecl(context, SemIR::LocId(callee_id), signature_id, signature_specific_id, callee.function_id); + auto thunk_id = + context.sem_ir().thunks().Add({.callee_id = callee_id, + .signature_id = signature_id, + .specific_id = signature_specific_id}); + // Track that this function is a thunk. - context.functions().Get(function_id).SetThunk(callee_id); + context.functions().Get(function_id).SetThunk(thunk_id); if (defer_definition) { // Register the thunk to be defined when we reach the end of the enclosing @@ -504,16 +510,16 @@ auto BuildThunk(Context& context, SemIR::FunctionId signature_id, context, { .signature_id = signature_id, .function_id = function_id, - .decl_id = thunk_id, + .decl_id = thunk_inst_id, .callee_id = callee_id, }); } else { - BuildThunkDefinition(context, signature_id, function_id, thunk_id, + BuildThunkDefinition(context, signature_id, function_id, thunk_inst_id, callee_id); context.scope_stack().Pop(); } - return thunk_id; + return thunk_inst_id; } auto BuildDestroyThunk(Context& context, SemIR::LocId loc_id, @@ -528,7 +534,7 @@ auto BuildDestroyThunk(Context& context, SemIR::LocId loc_id, .self_type_id = class_info.self_type_id}); auto& thunk_function = context.functions().Get(thunk_function_id); - thunk_function.SetThunk(SemIR::InstId::None); + thunk_function.SetThunk(SemIR::ThunkId::None); context.scope_stack().PushForDeclName(); StartFunctionDefinition(context, thunk_inst_id, thunk_function_id); diff --git a/toolchain/driver/testdata/compile/optimize/optimize_debug.carbon b/toolchain/driver/testdata/compile/optimize/optimize_debug.carbon index 5d6e4733505b..3521693bb873 100644 --- a/toolchain/driver/testdata/compile/optimize/optimize_debug.carbon +++ b/toolchain/driver/testdata/compile/optimize/optimize_debug.carbon @@ -120,7 +120,7 @@ fn VectorizedWithOptSpeed(a: array(i32, 65536)*) { // CHECK:STDOUT: !22 = !DILocation(line: 18, column: 9, scope: !16) // CHECK:STDOUT: !23 = !DILocation(line: 19, column: 5, scope: !16) // CHECK:STDOUT: !24 = !DILocation(line: 299, column: 3, scope: !25, inlinedAt: !32) -// CHECK:STDOUT: !25 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk.Int.9452f4c51951679b.Core:AddAssignWith.c820bd8c65a452f9.Core.bb7b2a0b30fd4cda", scope: null, file: !26, line: 299, type: !27, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !29) +// CHECK:STDOUT: !25 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:AddAssignWith.808ff30fe61f0791.Core:Int.9452f4c51951679b.Core:AddAssignWith.c820bd8c65a452f9.Core.bb7b2a0b30fd4cda", scope: null, file: !26, line: 299, type: !27, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !29) // CHECK:STDOUT: !26 = !DIFile(filename: "{{.*}}/prelude/types/int.carbon", directory: "") // CHECK:STDOUT: !27 = !DISubroutineType(types: !28) // CHECK:STDOUT: !28 = !{null, !7, !7} diff --git a/toolchain/driver/testdata/compile/optimize/optimize_default.carbon b/toolchain/driver/testdata/compile/optimize/optimize_default.carbon index fa27740bdc78..d2734013eb1a 100644 --- a/toolchain/driver/testdata/compile/optimize/optimize_default.carbon +++ b/toolchain/driver/testdata/compile/optimize/optimize_default.carbon @@ -120,7 +120,7 @@ fn VectorizedWithOptSpeed(a: array(i32, 65536)*) { // CHECK:STDOUT: !22 = !DILocation(line: 18, column: 9, scope: !16) // CHECK:STDOUT: !23 = !DILocation(line: 19, column: 5, scope: !16) // CHECK:STDOUT: !24 = !DILocation(line: 299, column: 3, scope: !25, inlinedAt: !32) -// CHECK:STDOUT: !25 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk.Int.9452f4c51951679b.Core:AddAssignWith.c820bd8c65a452f9.Core.bb7b2a0b30fd4cda", scope: null, file: !26, line: 299, type: !27, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !29) +// CHECK:STDOUT: !25 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:AddAssignWith.808ff30fe61f0791.Core:Int.9452f4c51951679b.Core:AddAssignWith.c820bd8c65a452f9.Core.bb7b2a0b30fd4cda", scope: null, file: !26, line: 299, type: !27, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !29) // CHECK:STDOUT: !26 = !DIFile(filename: "{{.*}}/prelude/types/int.carbon", directory: "") // CHECK:STDOUT: !27 = !DISubroutineType(types: !28) // CHECK:STDOUT: !28 = !{null, !7, !7} diff --git a/toolchain/driver/testdata/compile/optimize/optimize_none.carbon b/toolchain/driver/testdata/compile/optimize/optimize_none.carbon index 4a4a28a96b24..25998d1b6a19 100644 --- a/toolchain/driver/testdata/compile/optimize/optimize_none.carbon +++ b/toolchain/driver/testdata/compile/optimize/optimize_none.carbon @@ -94,12 +94,12 @@ fn VectorizedWithOptSpeed(a: array(i32, 65536)*) { // 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 !34 { -// CHECK:STDOUT: call void @"_COp:thunk.Int.9452f4c51951679b.Core:AddAssignWith.c820bd8c65a452f9.Core.bb7b2a0b30fd4cda"(ptr %self, i32 1), !dbg !38 +// CHECK:STDOUT: call void @"_COp:thunk:AddAssignWith.808ff30fe61f0791.Core:Int.9452f4c51951679b.Core:AddAssignWith.c820bd8c65a452f9.Core.bb7b2a0b30fd4cda"(ptr %self, i32 1), !dbg !38 // CHECK:STDOUT: ret void, !dbg !39 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: noinline nounwind optnone -// CHECK:STDOUT: define linkonce_odr void @"_COp:thunk.Int.9452f4c51951679b.Core:AddAssignWith.c820bd8c65a452f9.Core.bb7b2a0b30fd4cda"(ptr %self, i32 %other) #0 !dbg !40 { +// CHECK:STDOUT: define linkonce_odr void @"_COp:thunk:AddAssignWith.808ff30fe61f0791.Core:Int.9452f4c51951679b.Core:AddAssignWith.c820bd8c65a452f9.Core.bb7b2a0b30fd4cda"(ptr %self, i32 %other) #0 !dbg !40 { // CHECK:STDOUT: %1 = call i32 @"_CConvert.1f02987e9673cc00:ImplicitAs.d993a5132e000405.Core.dc9462e6da0d394c"(i32 %other), !dbg !46 // CHECK:STDOUT: %2 = load i32, ptr %self, align 4, !dbg !47 // CHECK:STDOUT: %3 = add i32 %2, %1, !dbg !47 @@ -164,7 +164,7 @@ fn VectorizedWithOptSpeed(a: array(i32, 65536)*) { // CHECK:STDOUT: !37 = !DILocalVariable(arg: 1, scope: !34, type: !7) // CHECK:STDOUT: !38 = !DILocation(line: 365, column: 5, scope: !34) // CHECK:STDOUT: !39 = !DILocation(line: 363, column: 3, scope: !34) -// CHECK:STDOUT: !40 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk.Int.9452f4c51951679b.Core:AddAssignWith.c820bd8c65a452f9.Core.bb7b2a0b30fd4cda", scope: null, file: !35, line: 299, type: !41, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !43) +// CHECK:STDOUT: !40 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:AddAssignWith.808ff30fe61f0791.Core:Int.9452f4c51951679b.Core:AddAssignWith.c820bd8c65a452f9.Core.bb7b2a0b30fd4cda", scope: null, file: !35, line: 299, type: !41, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !43) // CHECK:STDOUT: !41 = !DISubroutineType(types: !42) // CHECK:STDOUT: !42 = !{null, !7, !7} // CHECK:STDOUT: !43 = !{!44, !45} diff --git a/toolchain/driver/testdata/compile/optimize/optimize_size.carbon b/toolchain/driver/testdata/compile/optimize/optimize_size.carbon index 26b2597759c3..d686abf669fb 100644 --- a/toolchain/driver/testdata/compile/optimize/optimize_size.carbon +++ b/toolchain/driver/testdata/compile/optimize/optimize_size.carbon @@ -93,12 +93,12 @@ fn VectorizedWithOptSpeed(a: array(i32, 65536)*) { // 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 !34 { -// CHECK:STDOUT: call void @"_COp:thunk.Int.9452f4c51951679b.Core:AddAssignWith.c820bd8c65a452f9.Core.bb7b2a0b30fd4cda"(ptr %self, i32 1), !dbg !38 +// CHECK:STDOUT: call void @"_COp:thunk:AddAssignWith.808ff30fe61f0791.Core:Int.9452f4c51951679b.Core:AddAssignWith.c820bd8c65a452f9.Core.bb7b2a0b30fd4cda"(ptr %self, i32 1), !dbg !38 // CHECK:STDOUT: ret void, !dbg !39 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline minsize nounwind optsize -// CHECK:STDOUT: define linkonce_odr void @"_COp:thunk.Int.9452f4c51951679b.Core:AddAssignWith.c820bd8c65a452f9.Core.bb7b2a0b30fd4cda"(ptr %self, i32 %other) #2 !dbg !40 { +// CHECK:STDOUT: define linkonce_odr void @"_COp:thunk:AddAssignWith.808ff30fe61f0791.Core:Int.9452f4c51951679b.Core:AddAssignWith.c820bd8c65a452f9.Core.bb7b2a0b30fd4cda"(ptr %self, i32 %other) #2 !dbg !40 { // CHECK:STDOUT: %1 = call i32 @"_CConvert.1f02987e9673cc00:ImplicitAs.d993a5132e000405.Core.dc9462e6da0d394c"(i32 %other), !dbg !46 // CHECK:STDOUT: %2 = load i32, ptr %self, align 4, !dbg !47 // CHECK:STDOUT: %3 = add i32 %2, %1, !dbg !47 @@ -164,7 +164,7 @@ fn VectorizedWithOptSpeed(a: array(i32, 65536)*) { // CHECK:STDOUT: !37 = !DILocalVariable(arg: 1, scope: !34, type: !7) // CHECK:STDOUT: !38 = !DILocation(line: 365, column: 5, scope: !34) // CHECK:STDOUT: !39 = !DILocation(line: 363, column: 3, scope: !34) -// CHECK:STDOUT: !40 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk.Int.9452f4c51951679b.Core:AddAssignWith.c820bd8c65a452f9.Core.bb7b2a0b30fd4cda", scope: null, file: !35, line: 299, type: !41, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !43) +// CHECK:STDOUT: !40 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:AddAssignWith.808ff30fe61f0791.Core:Int.9452f4c51951679b.Core:AddAssignWith.c820bd8c65a452f9.Core.bb7b2a0b30fd4cda", scope: null, file: !35, line: 299, type: !41, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !43) // CHECK:STDOUT: !41 = !DISubroutineType(types: !42) // CHECK:STDOUT: !42 = !{null, !7, !7} // CHECK:STDOUT: !43 = !{!44, !45} diff --git a/toolchain/driver/testdata/compile/optimize/optimize_speed.carbon b/toolchain/driver/testdata/compile/optimize/optimize_speed.carbon index c42331260842..bbef64c7f374 100644 --- a/toolchain/driver/testdata/compile/optimize/optimize_speed.carbon +++ b/toolchain/driver/testdata/compile/optimize/optimize_speed.carbon @@ -135,7 +135,7 @@ fn VectorizedWithOptSpeed(a: array(i32, 65536)*) { // CHECK:STDOUT: !21 = !DILocalVariable(arg: 1, scope: !16, type: !19) // CHECK:STDOUT: !22 = !DILocation(line: 18, column: 9, scope: !16) // CHECK:STDOUT: !23 = !DILocation(line: 299, column: 3, scope: !24, inlinedAt: !31) -// CHECK:STDOUT: !24 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk.Int.9452f4c51951679b.Core:AddAssignWith.c820bd8c65a452f9.Core.bb7b2a0b30fd4cda", scope: null, file: !25, line: 299, type: !26, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !28) +// CHECK:STDOUT: !24 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:AddAssignWith.808ff30fe61f0791.Core:Int.9452f4c51951679b.Core:AddAssignWith.c820bd8c65a452f9.Core.bb7b2a0b30fd4cda", scope: null, file: !25, line: 299, type: !26, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !28) // CHECK:STDOUT: !25 = !DIFile(filename: "{{.*}}/prelude/types/int.carbon", directory: "") // CHECK:STDOUT: !26 = !DISubroutineType(types: !27) // CHECK:STDOUT: !27 = !{null, !7, !7} diff --git a/toolchain/lower/testdata/array/iterate.carbon b/toolchain/lower/testdata/array/iterate.carbon index 4da5a4ba1525..2c21103febc4 100644 --- a/toolchain/lower/testdata/array/iterate.carbon +++ b/toolchain/lower/testdata/array/iterate.carbon @@ -141,7 +141,7 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind // CHECK:STDOUT: define linkonce_odr void @"_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8"(ptr %self) #0 !dbg !77 { -// CHECK:STDOUT: call void @"_COp:thunk.Int.9452f4c51951679b.Core:AddAssignWith.3fed4bf7a4851faa.Core.5c85b74322e1187b"(ptr %self, i32 1), !dbg !81 +// CHECK:STDOUT: call void @"_COp:thunk:AddAssignWith.37e622b8bcf1ddff.Core:Int.9452f4c51951679b.Core:AddAssignWith.3fed4bf7a4851faa.Core.5c85b74322e1187b"(ptr %self, i32 1), !dbg !81 // CHECK:STDOUT: ret void, !dbg !82 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -173,7 +173,7 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind -// CHECK:STDOUT: define linkonce_odr void @"_COp:thunk.Int.9452f4c51951679b.Core:AddAssignWith.3fed4bf7a4851faa.Core.5c85b74322e1187b"(ptr %self, i32 %other) #2 !dbg !105 { +// CHECK:STDOUT: define linkonce_odr void @"_COp:thunk:AddAssignWith.37e622b8bcf1ddff.Core:Int.9452f4c51951679b.Core:AddAssignWith.3fed4bf7a4851faa.Core.5c85b74322e1187b"(ptr %self, i32 %other) #2 !dbg !105 { // CHECK:STDOUT: %1 = call i32 @"_CConvert.0b8d6a4f60e9338d:ImplicitAs.11da3bb3c3dce533.Core.fe879877fb5b368f"(i32 %other), !dbg !111 // CHECK:STDOUT: %2 = load i32, ptr %self, align 4, !dbg !112 // CHECK:STDOUT: %3 = add i32 %2, %1, !dbg !112 @@ -323,7 +323,7 @@ fn F() { // CHECK:STDOUT: !102 = !DILocalVariable(arg: 1, scope: !100, type: !26) // CHECK:STDOUT: !103 = !DILocation(line: 136, column: 12, scope: !100) // CHECK:STDOUT: !104 = !DILocation(line: 136, column: 5, scope: !100) -// CHECK:STDOUT: !105 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk.Int.9452f4c51951679b.Core:AddAssignWith.3fed4bf7a4851faa.Core.5c85b74322e1187b", scope: null, file: !78, line: 299, type: !106, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !108) +// CHECK:STDOUT: !105 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:AddAssignWith.37e622b8bcf1ddff.Core:Int.9452f4c51951679b.Core:AddAssignWith.3fed4bf7a4851faa.Core.5c85b74322e1187b", scope: null, file: !78, line: 299, type: !106, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !108) // CHECK:STDOUT: !106 = !DISubroutineType(types: !107) // CHECK:STDOUT: !107 = !{null, !15, !15} // CHECK:STDOUT: !108 = !{!109, !110} diff --git a/toolchain/lower/testdata/for/break_continue.carbon b/toolchain/lower/testdata/for/break_continue.carbon index 681058deb200..c6a87e1230bb 100644 --- a/toolchain/lower/testdata/for/break_continue.carbon +++ b/toolchain/lower/testdata/for/break_continue.carbon @@ -173,7 +173,7 @@ fn For() { // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind // CHECK:STDOUT: define linkonce_odr void @"_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8"(ptr %self) #0 !dbg !90 { -// CHECK:STDOUT: call void @"_COp:thunk.Int.9452f4c51951679b.Core:AddAssignWith.c820bd8c65a452f9.Core.bb7b2a0b30fd4cda"(ptr %self, i32 1), !dbg !94 +// CHECK:STDOUT: call void @"_COp:thunk:AddAssignWith.848b00090916d4a0.Core:Int.9452f4c51951679b.Core:AddAssignWith.c820bd8c65a452f9.Core.bb7b2a0b30fd4cda"(ptr %self, i32 1), !dbg !94 // CHECK:STDOUT: ret void, !dbg !95 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -205,7 +205,7 @@ fn For() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind -// CHECK:STDOUT: define linkonce_odr void @"_COp:thunk.Int.9452f4c51951679b.Core:AddAssignWith.c820bd8c65a452f9.Core.bb7b2a0b30fd4cda"(ptr %self, i32 %other) #2 !dbg !118 { +// CHECK:STDOUT: define linkonce_odr void @"_COp:thunk:AddAssignWith.848b00090916d4a0.Core:Int.9452f4c51951679b.Core:AddAssignWith.c820bd8c65a452f9.Core.bb7b2a0b30fd4cda"(ptr %self, i32 %other) #2 !dbg !118 { // CHECK:STDOUT: %1 = call i32 @"_CConvert.1f02987e9673cc00:ImplicitAs.d993a5132e000405.Core.dc9462e6da0d394c"(i32 %other), !dbg !124 // CHECK:STDOUT: %2 = load i32, ptr %self, align 4, !dbg !125 // CHECK:STDOUT: %3 = add i32 %2, %1, !dbg !125 @@ -368,7 +368,7 @@ fn For() { // CHECK:STDOUT: !115 = !DILocalVariable(arg: 1, scope: !113, type: !33) // CHECK:STDOUT: !116 = !DILocation(line: 136, column: 12, scope: !113) // CHECK:STDOUT: !117 = !DILocation(line: 136, column: 5, scope: !113) -// CHECK:STDOUT: !118 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk.Int.9452f4c51951679b.Core:AddAssignWith.c820bd8c65a452f9.Core.bb7b2a0b30fd4cda", scope: null, file: !91, line: 299, type: !119, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !121) +// CHECK:STDOUT: !118 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:AddAssignWith.848b00090916d4a0.Core:Int.9452f4c51951679b.Core:AddAssignWith.c820bd8c65a452f9.Core.bb7b2a0b30fd4cda", scope: null, file: !91, line: 299, type: !119, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !121) // CHECK:STDOUT: !119 = !DISubroutineType(types: !120) // CHECK:STDOUT: !120 = !{null, !22, !22} // CHECK:STDOUT: !121 = !{!122, !123} diff --git a/toolchain/lower/testdata/for/for.carbon b/toolchain/lower/testdata/for/for.carbon index 26a86d814b65..c2054d75d7e1 100644 --- a/toolchain/lower/testdata/for/for.carbon +++ b/toolchain/lower/testdata/for/for.carbon @@ -161,7 +161,7 @@ fn For() { // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind // CHECK:STDOUT: define linkonce_odr void @"_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8"(ptr %self) #0 !dbg !86 { -// CHECK:STDOUT: call void @"_COp:thunk.Int.9452f4c51951679b.Core:AddAssignWith.c820bd8c65a452f9.Core.bb7b2a0b30fd4cda"(ptr %self, i32 1), !dbg !90 +// CHECK:STDOUT: call void @"_COp:thunk:AddAssignWith.848b00090916d4a0.Core:Int.9452f4c51951679b.Core:AddAssignWith.c820bd8c65a452f9.Core.bb7b2a0b30fd4cda"(ptr %self, i32 1), !dbg !90 // CHECK:STDOUT: ret void, !dbg !91 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -193,7 +193,7 @@ fn For() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind -// CHECK:STDOUT: define linkonce_odr void @"_COp:thunk.Int.9452f4c51951679b.Core:AddAssignWith.c820bd8c65a452f9.Core.bb7b2a0b30fd4cda"(ptr %self, i32 %other) #2 !dbg !114 { +// CHECK:STDOUT: define linkonce_odr void @"_COp:thunk:AddAssignWith.848b00090916d4a0.Core:Int.9452f4c51951679b.Core:AddAssignWith.c820bd8c65a452f9.Core.bb7b2a0b30fd4cda"(ptr %self, i32 %other) #2 !dbg !114 { // CHECK:STDOUT: %1 = call i32 @"_CConvert.1f02987e9673cc00:ImplicitAs.d993a5132e000405.Core.dc9462e6da0d394c"(i32 %other), !dbg !120 // CHECK:STDOUT: %2 = load i32, ptr %self, align 4, !dbg !121 // CHECK:STDOUT: %3 = add i32 %2, %1, !dbg !121 @@ -352,7 +352,7 @@ fn For() { // CHECK:STDOUT: !111 = !DILocalVariable(arg: 1, scope: !109, type: !29) // CHECK:STDOUT: !112 = !DILocation(line: 136, column: 12, scope: !109) // CHECK:STDOUT: !113 = !DILocation(line: 136, column: 5, scope: !109) -// CHECK:STDOUT: !114 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk.Int.9452f4c51951679b.Core:AddAssignWith.c820bd8c65a452f9.Core.bb7b2a0b30fd4cda", scope: null, file: !87, line: 299, type: !115, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !117) +// CHECK:STDOUT: !114 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:AddAssignWith.848b00090916d4a0.Core:Int.9452f4c51951679b.Core:AddAssignWith.c820bd8c65a452f9.Core.bb7b2a0b30fd4cda", scope: null, file: !87, line: 299, type: !115, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !117) // CHECK:STDOUT: !115 = !DISubroutineType(types: !116) // CHECK:STDOUT: !116 = !{null, !18, !18} // CHECK:STDOUT: !117 = !{!118, !119} diff --git a/toolchain/lower/testdata/impl/import_thunk.carbon b/toolchain/lower/testdata/impl/import_thunk.carbon index 4469e120cea2..18fbd41d296e 100644 --- a/toolchain/lower/testdata/impl/import_thunk.carbon +++ b/toolchain/lower/testdata/impl/import_thunk.carbon @@ -100,7 +100,7 @@ fn Test(a: A) -> C { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind -// CHECK:STDOUT: define void @"_CF:thunk.61ea2aba74ab3bf1:I.Main"(ptr sret({ i32 }) %return, ptr %a) #1 !dbg !25 { +// CHECK:STDOUT: define void @"_CF:thunk:I.5ae44f439e6b6107.Main:61ea2aba74ab3bf1:I.Main"(ptr sret({ i32 }) %return, ptr %a) #1 !dbg !25 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %.loc20_19.1.temp = alloca { i32 }, align 8, !dbg !28 // CHECK:STDOUT: %.loc16_9.1.temp = alloca { i32 }, align 8, !dbg !29 @@ -171,7 +171,7 @@ fn Test(a: A) -> C { // CHECK:STDOUT: !22 = !DILocation(line: 20, column: 34, scope: !19) // CHECK:STDOUT: !23 = !DILocation(line: 20, column: 28, scope: !19) // CHECK:STDOUT: !24 = !DILocation(line: 20, column: 21, scope: !19) -// CHECK:STDOUT: !25 = distinct !DISubprogram(name: "F", linkageName: "_CF:thunk.61ea2aba74ab3bf1:I.Main", scope: null, file: !3, line: 20, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !26) +// CHECK:STDOUT: !25 = distinct !DISubprogram(name: "F", linkageName: "_CF:thunk:I.5ae44f439e6b6107.Main:61ea2aba74ab3bf1:I.Main", scope: null, file: !3, line: 20, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !26) // CHECK:STDOUT: !26 = !{!27} // CHECK:STDOUT: !27 = !DILocalVariable(arg: 1, scope: !25, type: !7) // CHECK:STDOUT: !28 = !DILocation(line: 20, column: 3, scope: !25) @@ -213,7 +213,7 @@ fn Test(a: A) -> C { // CHECK:STDOUT: ret void, !dbg !12 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: declare void @"_CF:thunk.61ea2aba74ab3bf1:I.Main"(ptr sret({ i32 }), ptr) +// CHECK:STDOUT: declare void @"_CF:thunk:I.1ede6ff4110118d7.Main:61ea2aba74ab3bf1:I.Main"(ptr sret({ i32 }), ptr) // CHECK:STDOUT: // CHECK:STDOUT: declare void @"_CF.61ea2aba74ab3bf1:I.Main"(ptr sret({ i32 }), ptr) // CHECK:STDOUT: @@ -296,7 +296,7 @@ fn Test(a: A) -> C { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind -// CHECK:STDOUT: define void @"_CF:thunk.X.Main:I.Main"(ptr sret({ i32 }) %return, ptr %a) #1 !dbg !13 { +// CHECK:STDOUT: define void @"_CF:thunk:I.e55c78367db83a6b.Main:X.Main:I.Main"(ptr sret({ i32 }) %return, ptr %a) #1 !dbg !13 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %.loc9_19.1.temp = alloca { i32 }, align 8, !dbg !16 // CHECK:STDOUT: %.2.temp = alloca { i32 }, align 8 @@ -359,7 +359,7 @@ fn Test(a: A) -> C { // CHECK:STDOUT: !10 = !DILocation(line: 9, column: 34, scope: !4) // CHECK:STDOUT: !11 = !DILocation(line: 9, column: 28, scope: !4) // CHECK:STDOUT: !12 = !DILocation(line: 9, column: 21, scope: !4) -// CHECK:STDOUT: !13 = distinct !DISubprogram(name: "F", linkageName: "_CF:thunk.X.Main:I.Main", scope: null, file: !3, line: 9, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !14) +// CHECK:STDOUT: !13 = distinct !DISubprogram(name: "F", linkageName: "_CF:thunk:I.e55c78367db83a6b.Main:X.Main:I.Main", scope: null, file: !3, line: 9, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !14) // CHECK:STDOUT: !14 = !{!15} // CHECK:STDOUT: !15 = !DILocalVariable(arg: 1, scope: !13, type: !7) // CHECK:STDOUT: !16 = !DILocation(line: 9, column: 3, scope: !13) @@ -401,7 +401,7 @@ fn Test(a: A) -> C { // CHECK:STDOUT: ret void, !dbg !12 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: declare void @"_CF:thunk.X.Main:I.Main"(ptr sret({ i32 }), ptr) +// CHECK:STDOUT: declare void @"_CF:thunk:I.9d1db36de5cccc48.Main:X.Main:I.Main"(ptr sret({ i32 }), ptr) // CHECK:STDOUT: // CHECK:STDOUT: declare void @"_CF.X.Main:I.Main"(ptr sret({ i32 }), ptr) // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/impl/thunk.carbon b/toolchain/lower/testdata/impl/thunk.carbon index 63eada751a61..e36a8be8a730 100644 --- a/toolchain/lower/testdata/impl/thunk.carbon +++ b/toolchain/lower/testdata/impl/thunk.carbon @@ -104,7 +104,7 @@ fn CallCallGeneric(c: C(()), b: B) -> A { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind -// CHECK:STDOUT: define void @"_CF:thunk.61ea2aba74ab3bf1:I.Main"(ptr sret({ i32 }) %return, ptr %a) #1 !dbg !25 { +// CHECK:STDOUT: define void @"_CF:thunk:I.5ae44f439e6b6107.Main:61ea2aba74ab3bf1:I.Main"(ptr sret({ i32 }) %return, ptr %a) #1 !dbg !25 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %.loc20_19.1.temp = alloca { i32 }, align 8, !dbg !28 // CHECK:STDOUT: %.loc16_9.1.temp = alloca { i32 }, align 8, !dbg !29 @@ -192,7 +192,7 @@ fn CallCallGeneric(c: C(()), b: B) -> A { // CHECK:STDOUT: !22 = !DILocation(line: 20, column: 34, scope: !19) // CHECK:STDOUT: !23 = !DILocation(line: 20, column: 28, scope: !19) // CHECK:STDOUT: !24 = !DILocation(line: 20, column: 21, scope: !19) -// CHECK:STDOUT: !25 = distinct !DISubprogram(name: "F", linkageName: "_CF:thunk.61ea2aba74ab3bf1:I.Main", scope: null, file: !3, line: 20, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !26) +// CHECK:STDOUT: !25 = distinct !DISubprogram(name: "F", linkageName: "_CF:thunk:I.5ae44f439e6b6107.Main:61ea2aba74ab3bf1:I.Main", scope: null, file: !3, line: 20, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !26) // CHECK:STDOUT: !26 = !{!27} // CHECK:STDOUT: !27 = !DILocalVariable(arg: 1, scope: !25, type: !7) // CHECK:STDOUT: !28 = !DILocation(line: 20, column: 3, scope: !25) @@ -289,12 +289,12 @@ fn CallCallGeneric(c: C(()), b: B) -> A { // CHECK:STDOUT: ; Function Attrs: nounwind // CHECK:STDOUT: define linkonce_odr void @_CCallGeneric.Main.0bac38e8a17f7a1f(ptr sret({}) %return, ptr %c, ptr %b) #0 !dbg !41 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CF:thunk.C.eb057aa32837c84e.Main:I.eb057aa32837c84e.Main.e43630e9a6c38c3f"(ptr %return, ptr %c, ptr %b), !dbg !45 +// CHECK:STDOUT: call void @"_CF:thunk:I.1f5037c5d69ffaf4.Main:C.eb057aa32837c84e.Main:I.eb057aa32837c84e.Main.e43630e9a6c38c3f"(ptr %return, ptr %c, ptr %b), !dbg !45 // CHECK:STDOUT: ret void, !dbg !46 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind -// CHECK:STDOUT: define linkonce_odr void @"_CF:thunk.C.eb057aa32837c84e.Main:I.eb057aa32837c84e.Main.e43630e9a6c38c3f"(ptr sret({}) %return, ptr %self, ptr %x) #3 !dbg !47 { +// CHECK:STDOUT: define linkonce_odr void @"_CF:thunk:I.1f5037c5d69ffaf4.Main:C.eb057aa32837c84e.Main:I.eb057aa32837c84e.Main.e43630e9a6c38c3f"(ptr sret({}) %return, ptr %self, ptr %x) #3 !dbg !47 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %.loc18_38.2.temp = alloca {}, align 8, !dbg !51 // CHECK:STDOUT: %.loc18_38.6.temp = alloca {}, align 8, !dbg !51 @@ -370,7 +370,7 @@ fn CallCallGeneric(c: C(()), b: B) -> A { // CHECK:STDOUT: !44 = !DILocalVariable(arg: 2, scope: !41, type: !7) // CHECK:STDOUT: !45 = !DILocation(line: 26, column: 10, scope: !41) // CHECK:STDOUT: !46 = !DILocation(line: 26, column: 3, scope: !41) -// CHECK:STDOUT: !47 = distinct !DISubprogram(name: "F", linkageName: "_CF:thunk.C.eb057aa32837c84e.Main:I.eb057aa32837c84e.Main.e43630e9a6c38c3f", scope: null, file: !3, line: 18, type: !22, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !48) +// CHECK:STDOUT: !47 = distinct !DISubprogram(name: "F", linkageName: "_CF:thunk:I.1f5037c5d69ffaf4.Main:C.eb057aa32837c84e.Main:I.eb057aa32837c84e.Main.e43630e9a6c38c3f", scope: null, file: !3, line: 18, type: !22, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !48) // CHECK:STDOUT: !48 = !{!49, !50} // CHECK:STDOUT: !49 = !DILocalVariable(arg: 1, scope: !47, type: !7) // CHECK:STDOUT: !50 = !DILocalVariable(arg: 2, scope: !47, type: !7) diff --git a/toolchain/lower/testdata/interop/cpp/constructor.carbon b/toolchain/lower/testdata/interop/cpp/constructor.carbon index 1b694de1106a..a9d69a563635 100644 --- a/toolchain/lower/testdata/interop/cpp/constructor.carbon +++ b/toolchain/lower/testdata/interop/cpp/constructor.carbon @@ -296,7 +296,7 @@ fn Four() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind -// CHECK:STDOUT: define void @"_COp:thunk.C.Cpp"(ptr sret([8 x i8]) %return) #2 !dbg !19 { +// CHECK:STDOUT: define void @"_COp:thunk:Default.7b1e6a57c714cdb7.Core:C.Cpp"(ptr sret([8 x i8]) %return) #2 !dbg !19 { // CHECK:STDOUT: entry: // CHECK:STDOUT: call void @_ZN1CC1Ev.carbon_thunk(ptr %return), !dbg !24 // CHECK:STDOUT: ret void, !dbg !24 @@ -307,7 +307,7 @@ fn Four() { // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind // CHECK:STDOUT: define linkonce_odr void @"_COp.d288d62be0e5d791:DefaultOrUnformed.Core.93349b0fe912a29b"(ptr sret([8 x i8]) %return) #0 !dbg !25 { -// CHECK:STDOUT: call void @"_COp:thunk.C.Cpp"(ptr %return), !dbg !27 +// CHECK:STDOUT: call void @"_COp:thunk:Default.7b1e6a57c714cdb7.Core:C.Cpp"(ptr %return), !dbg !27 // CHECK:STDOUT: ret void, !dbg !28 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -353,7 +353,7 @@ fn Four() { // CHECK:STDOUT: !16 = !{!17, !17, i64 0} // CHECK:STDOUT: !17 = !{!"p1 _ZTS1C", !18, i64 0} // CHECK:STDOUT: !18 = !{!"any pointer", !9, i64 0} -// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk.C.Cpp", scope: null, file: !20, line: 4, type: !21, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:Default.7b1e6a57c714cdb7.Core:C.Cpp", scope: null, file: !20, line: 4, type: !21, spFlags: DISPFlagDefinition, unit: !5) // CHECK:STDOUT: !20 = !DIFile(filename: "./default.h", directory: "") // CHECK:STDOUT: !21 = !DISubroutineType(types: !22) // CHECK:STDOUT: !22 = !{!23} @@ -407,7 +407,7 @@ fn Four() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind -// CHECK:STDOUT: define void @"_COp:thunk.ImplicitlyDefaultedDefault.Cpp"(ptr sret([4 x i8]) %return) #2 !dbg !22 { +// CHECK:STDOUT: define void @"_COp:thunk:Default.2e5fb550c65543cf.Core:ImplicitlyDefaultedDefault.Cpp"(ptr sret([4 x i8]) %return) #2 !dbg !22 { // CHECK:STDOUT: entry: // CHECK:STDOUT: call void @_ZN26ImplicitlyDefaultedDefaultC1Ev.carbon_thunk(ptr %return), !dbg !27 // CHECK:STDOUT: ret void, !dbg !27 @@ -424,7 +424,7 @@ fn Four() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind -// CHECK:STDOUT: define void @"_COp:thunk.ExplicitlyDefaultedDefault.Cpp"(ptr sret([4 x i8]) %return) #2 !dbg !30 { +// CHECK:STDOUT: define void @"_COp:thunk:Default.cad83ce9b7db87bf.Core:ExplicitlyDefaultedDefault.Cpp"(ptr sret([4 x i8]) %return) #2 !dbg !30 { // CHECK:STDOUT: entry: // CHECK:STDOUT: call void @_ZN26ExplicitlyDefaultedDefaultC1Ev.carbon_thunk(ptr %return), !dbg !31 // CHECK:STDOUT: ret void, !dbg !31 @@ -435,13 +435,13 @@ fn Four() { // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind // CHECK:STDOUT: define linkonce_odr void @"_COp.d288d62be0e5d791:DefaultOrUnformed.Core.22b4681b019423d7"(ptr sret([4 x i8]) %return) #0 !dbg !32 { -// CHECK:STDOUT: call void @"_COp:thunk.ImplicitlyDefaultedDefault.Cpp"(ptr %return), !dbg !34 +// CHECK:STDOUT: call void @"_COp:thunk:Default.2e5fb550c65543cf.Core:ImplicitlyDefaultedDefault.Cpp"(ptr %return), !dbg !34 // CHECK:STDOUT: ret void, !dbg !35 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind // CHECK:STDOUT: define linkonce_odr void @"_COp.d288d62be0e5d791:DefaultOrUnformed.Core.1a27c303748a2360"(ptr sret([4 x i8]) %return) #0 !dbg !36 { -// CHECK:STDOUT: call void @"_COp:thunk.ExplicitlyDefaultedDefault.Cpp"(ptr %return), !dbg !37 +// CHECK:STDOUT: call void @"_COp:thunk:Default.cad83ce9b7db87bf.Core:ExplicitlyDefaultedDefault.Cpp"(ptr %return), !dbg !37 // CHECK:STDOUT: ret void, !dbg !38 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -503,7 +503,7 @@ fn Four() { // CHECK:STDOUT: !19 = !{!20, !20, i64 0} // CHECK:STDOUT: !20 = !{!"p1 _ZTS26ImplicitlyDefaultedDefault", !21, i64 0} // CHECK:STDOUT: !21 = !{!"any pointer", !9, i64 0} -// CHECK:STDOUT: !22 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk.ImplicitlyDefaultedDefault.Cpp", scope: null, file: !23, line: 2, type: !24, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !22 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:Default.2e5fb550c65543cf.Core:ImplicitlyDefaultedDefault.Cpp", scope: null, file: !23, line: 2, type: !24, spFlags: DISPFlagDefinition, unit: !5) // CHECK:STDOUT: !23 = !DIFile(filename: "./defaulted_default.h", directory: "") // CHECK:STDOUT: !24 = !DISubroutineType(types: !25) // CHECK:STDOUT: !25 = !{!26} @@ -511,7 +511,7 @@ fn Four() { // CHECK:STDOUT: !27 = !DILocation(line: 2, column: 8, scope: !22) // CHECK:STDOUT: !28 = !{!29, !29, i64 0} // CHECK:STDOUT: !29 = !{!"p1 _ZTS26ExplicitlyDefaultedDefault", !21, i64 0} -// CHECK:STDOUT: !30 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk.ExplicitlyDefaultedDefault.Cpp", scope: null, file: !23, line: 7, type: !24, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !30 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:Default.cad83ce9b7db87bf.Core:ExplicitlyDefaultedDefault.Cpp", scope: null, file: !23, line: 7, type: !24, spFlags: DISPFlagDefinition, unit: !5) // CHECK:STDOUT: !31 = !DILocation(line: 7, column: 3, scope: !30) // CHECK:STDOUT: !32 = distinct !DISubprogram(name: "Op", linkageName: "_COp.d288d62be0e5d791:DefaultOrUnformed.Core.22b4681b019423d7", scope: null, file: !33, line: 9, type: !24, spFlags: DISPFlagDefinition, unit: !5) // CHECK:STDOUT: !33 = !DIFile(filename: "min_prelude/parts/default.carbon", directory: "") @@ -552,7 +552,7 @@ fn Four() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind -// CHECK:STDOUT: define void @"_COp:thunk.Copy.Cpp"(ptr sret([4 x i8]) %return, ptr %self) #2 !dbg !22 { +// CHECK:STDOUT: define void @"_COp:thunk:Copy.692da64e78c7deec.Core:Copy.Cpp"(ptr sret([4 x i8]) %return, ptr %self) #2 !dbg !22 { // CHECK:STDOUT: entry: // CHECK:STDOUT: call void @_ZN4CopyC1ERKS_.carbon_thunk(ptr %self, ptr %return), !dbg !26 // CHECK:STDOUT: ret void, !dbg !26 @@ -595,7 +595,7 @@ fn Four() { // CHECK:STDOUT: !19 = !{!20, !20, i64 0} // CHECK:STDOUT: !20 = !{!"p1 _ZTS4Copy", !21, i64 0} // CHECK:STDOUT: !21 = !{!"any pointer", !9, i64 0} -// CHECK:STDOUT: !22 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk.Copy.Cpp", scope: null, file: !23, line: 5, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !24) +// CHECK:STDOUT: !22 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:Copy.692da64e78c7deec.Core:Copy.Cpp", scope: null, file: !23, line: 5, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !24) // CHECK:STDOUT: !23 = !DIFile(filename: "./copy.h", directory: "") // CHECK:STDOUT: !24 = !{!25} // CHECK:STDOUT: !25 = !DILocalVariable(arg: 1, scope: !22, type: !14) diff --git a/toolchain/lower/testdata/interop/cpp/parameters.carbon b/toolchain/lower/testdata/interop/cpp/parameters.carbon index 1db96776a589..ed79da3dddf8 100644 --- a/toolchain/lower/testdata/interop/cpp/parameters.carbon +++ b/toolchain/lower/testdata/interop/cpp/parameters.carbon @@ -388,7 +388,7 @@ fn PassValueExpr(y: Cpp.Y) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind -// CHECK:STDOUT: define void @"_COp:thunk.X.Cpp"(ptr sret([12 x i8]) %return) #2 !dbg !23 { +// CHECK:STDOUT: define void @"_COp:thunk:Default.17a84649916546b3.Core:X.Cpp"(ptr sret([12 x i8]) %return) #2 !dbg !23 { // CHECK:STDOUT: entry: // CHECK:STDOUT: call void @_ZN1XC1Ev.carbon_thunk(ptr %return), !dbg !28 // CHECK:STDOUT: ret void, !dbg !28 @@ -417,7 +417,7 @@ fn PassValueExpr(y: Cpp.Y) { // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind // CHECK:STDOUT: define linkonce_odr void @"_COp.d288d62be0e5d791:DefaultOrUnformed.Core.64f6b96556a8f2d4"(ptr sret([12 x i8]) %return) #0 !dbg !30 { -// CHECK:STDOUT: call void @"_COp:thunk.X.Cpp"(ptr %return), !dbg !32 +// CHECK:STDOUT: call void @"_COp:thunk:Default.17a84649916546b3.Core:X.Cpp"(ptr %return), !dbg !32 // CHECK:STDOUT: ret void, !dbg !33 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -464,7 +464,7 @@ fn PassValueExpr(y: Cpp.Y) { // CHECK:STDOUT: !20 = !{!21, !21, i64 0} // CHECK:STDOUT: !21 = !{!"p1 _ZTS1X", !22, i64 0} // CHECK:STDOUT: !22 = !{!"any pointer", !9, i64 0} -// CHECK:STDOUT: !23 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk.X.Cpp", scope: null, file: !24, line: 2, type: !25, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !23 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:Default.17a84649916546b3.Core:X.Cpp", scope: null, file: !24, line: 2, type: !25, spFlags: DISPFlagDefinition, unit: !5) // CHECK:STDOUT: !24 = !DIFile(filename: "./struct.h", directory: "") // CHECK:STDOUT: !25 = !DISubroutineType(types: !26) // CHECK:STDOUT: !26 = !{!27} diff --git a/toolchain/lower/testdata/interop/cpp/reference.carbon b/toolchain/lower/testdata/interop/cpp/reference.carbon index 95c9a6b9eee0..393bb2f6e0ea 100644 --- a/toolchain/lower/testdata/interop/cpp/reference.carbon +++ b/toolchain/lower/testdata/interop/cpp/reference.carbon @@ -176,7 +176,7 @@ fn GetRefs() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind -// CHECK:STDOUT: define void @"_COp:thunk.C.Cpp"(ptr sret({}) %return) #2 !dbg !29 { +// CHECK:STDOUT: define void @"_COp:thunk:Default.7b1e6a57c714cdb7.Core:C.Cpp"(ptr sret({}) %return) #2 !dbg !29 { // CHECK:STDOUT: entry: // CHECK:STDOUT: call void @_ZN1CC1Ev.carbon_thunk(ptr %return), !dbg !33 // CHECK:STDOUT: ret void, !dbg !33 @@ -237,7 +237,7 @@ fn GetRefs() { // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind // CHECK:STDOUT: define linkonce_odr void @"_COp.d288d62be0e5d791:DefaultOrUnformed.Core.93349b0fe912a29b"(ptr sret({}) %return) #0 !dbg !43 { -// CHECK:STDOUT: call void @"_COp:thunk.C.Cpp"(ptr %return), !dbg !45 +// CHECK:STDOUT: call void @"_COp:thunk:Default.7b1e6a57c714cdb7.Core:C.Cpp"(ptr %return), !dbg !45 // CHECK:STDOUT: ret void, !dbg !46 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -297,7 +297,7 @@ fn GetRefs() { // CHECK:STDOUT: !26 = !{!27, !27, i64 0} // CHECK:STDOUT: !27 = !{!"p1 _ZTS1C", !28, i64 0} // CHECK:STDOUT: !28 = !{!"any pointer", !9, i64 0} -// CHECK:STDOUT: !29 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk.C.Cpp", scope: null, file: !6, line: 5, type: !30, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !29 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:Default.7b1e6a57c714cdb7.Core:C.Cpp", scope: null, file: !6, line: 5, type: !30, spFlags: DISPFlagDefinition, unit: !5) // CHECK:STDOUT: !30 = !DISubroutineType(types: !31) // CHECK:STDOUT: !31 = !{!32} // CHECK:STDOUT: !32 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) @@ -365,7 +365,7 @@ fn GetRefs() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind -// CHECK:STDOUT: define void @"_COp:thunk.C.Cpp"(ptr sret({}) %return) #2 !dbg !29 { +// CHECK:STDOUT: define void @"_COp:thunk:Default.7b1e6a57c714cdb7.Core:C.Cpp"(ptr sret({}) %return) #2 !dbg !29 { // CHECK:STDOUT: entry: // CHECK:STDOUT: call void @_ZN1CC1Ev.carbon_thunk(ptr %return), !dbg !33 // CHECK:STDOUT: ret void, !dbg !33 @@ -448,7 +448,7 @@ fn GetRefs() { // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind // CHECK:STDOUT: define linkonce_odr void @"_COp.d288d62be0e5d791:DefaultOrUnformed.Core.93349b0fe912a29b"(ptr sret({}) %return) #0 !dbg !45 { -// CHECK:STDOUT: call void @"_COp:thunk.C.Cpp"(ptr %return), !dbg !47 +// CHECK:STDOUT: call void @"_COp:thunk:Default.7b1e6a57c714cdb7.Core:C.Cpp"(ptr %return), !dbg !47 // CHECK:STDOUT: ret void, !dbg !48 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -508,7 +508,7 @@ fn GetRefs() { // CHECK:STDOUT: !26 = !{!27, !27, i64 0} // CHECK:STDOUT: !27 = !{!"p1 _ZTS1C", !28, i64 0} // CHECK:STDOUT: !28 = !{!"any pointer", !9, i64 0} -// CHECK:STDOUT: !29 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk.C.Cpp", scope: null, file: !6, line: 5, type: !30, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !29 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:Default.7b1e6a57c714cdb7.Core:C.Cpp", scope: null, file: !6, line: 5, type: !30, spFlags: DISPFlagDefinition, unit: !5) // CHECK:STDOUT: !30 = !DISubroutineType(types: !31) // CHECK:STDOUT: !31 = !{!32} // CHECK:STDOUT: !32 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) diff --git a/toolchain/lower/testdata/interop/cpp/thunks.carbon b/toolchain/lower/testdata/interop/cpp/thunks.carbon new file mode 100644 index 000000000000..6c5b25772758 --- /dev/null +++ b/toolchain/lower/testdata/interop/cpp/thunks.carbon @@ -0,0 +1,127 @@ +// 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/primitives.carbon +// EXTRA-ARGS: --clang-arg=-std=c++26 +// +// AUTOUPDATE +// TIP: To test this file alone, run: +// TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/lower/testdata/interop/cpp/thunks.carbon +// TIP: To dump output, run: +// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/lower/testdata/interop/cpp/thunks.carbon + +// --- need_thunk.h + +struct NeedThunk { + NeedThunk(); + NeedThunk(const NeedThunk&); + ~NeedThunk() = default; +}; + +// --- multiple_thunks_in_one_class.carbon + +library "[[@TEST_NAME]]"; + +import Cpp library "need_thunk.h"; + +// We intend to create multiple thunks named `Op` here to demonstrate the need +// for the mangling to include the signature function. +fn Call(n: Cpp.NeedThunk) { + var unused n2: Cpp.NeedThunk = n; +} + +// CHECK:STDOUT: ; ModuleID = 'multiple_thunks_in_one_class.carbon' +// CHECK:STDOUT: source_filename = "multiple_thunks_in_one_class.carbon" +// CHECK:STDOUT: target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128" +// CHECK:STDOUT: target triple = "x86_64-unknown-linux-gnu" +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define void @_CCall.Main(ptr %n) #0 !dbg !11 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: %n2.var = alloca [1 x i8], align 1, !dbg !17 +// CHECK:STDOUT: %.loc9_34.1.temp = alloca [1 x i8], align 1, !dbg !18 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %n2.var), !dbg !17 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc9_34.1.temp), !dbg !18 +// CHECK:STDOUT: call void @_ZN9NeedThunkC1ERKS_.carbon_thunk(ptr %n, ptr %n2.var), !dbg !18 +// CHECK:STDOUT: ret void, !dbg !19 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress uwtable +// CHECK:STDOUT: define internal void @_ZN9NeedThunkC1ERKS_.carbon_thunk(ptr noundef %0, ptr noundef %return) #1 { +// 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 !20 +// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !20 +// CHECK:STDOUT: %1 = load ptr, ptr %return.addr, align 8, !tbaa !20 +// CHECK:STDOUT: %2 = load ptr, ptr %.addr, align 8, !tbaa !20 +// 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: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind +// CHECK:STDOUT: define void @"_COp:thunk:Copy.fdeb6dbda014bd1f.Core:NeedThunk.Cpp"(ptr sret([1 x i8]) %return, ptr %self) #2 !dbg !23 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @_ZN9NeedThunkC1ERKS_.carbon_thunk(ptr %self, ptr %return), !dbg !29 +// CHECK:STDOUT: ret void, !dbg !29 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind +// CHECK:STDOUT: define void @"_COp:thunk:Destroy.91afe58d20fe9768.Core:NeedThunk.Cpp"(ptr %self) #2 !dbg !30 { +// 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)) #3 +// 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 +// CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 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 = { alwaysinline nounwind } +// CHECK:STDOUT: attributes #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } +// CHECK:STDOUT: attributes #4 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +// CHECK:STDOUT: +// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4} +// CHECK:STDOUT: !llvm.dbg.cu = !{!5} +// CHECK:STDOUT: !llvm.errno.tbaa = !{!7} +// CHECK:STDOUT: +// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !2 = !{i32 8, !"PIC Level", i32 2} +// CHECK:STDOUT: !3 = !{i32 7, !"PIE Level", i32 2} +// CHECK:STDOUT: !4 = !{i32 7, !"uwtable", i32 2} +// CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !6 = !DIFile(filename: "multiple_thunks_in_one_class.carbon", directory: "") +// CHECK:STDOUT: !7 = !{!8, !8, i64 0} +// CHECK:STDOUT: !8 = !{!"int", !9, i64 0} +// CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0} +// CHECK:STDOUT: !10 = !{!"Simple C++ TBAA"} +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Call", linkageName: "_CCall.Main", scope: null, file: !6, line: 8, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !15) +// CHECK:STDOUT: !12 = !DISubroutineType(types: !13) +// CHECK:STDOUT: !13 = !{null, !14} +// CHECK:STDOUT: !14 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !15 = !{!16} +// CHECK:STDOUT: !16 = !DILocalVariable(arg: 1, scope: !11, type: !14) +// CHECK:STDOUT: !17 = !DILocation(line: 9, column: 3, scope: !11) +// CHECK:STDOUT: !18 = !DILocation(line: 9, column: 34, scope: !11) +// CHECK:STDOUT: !19 = !DILocation(line: 8, column: 1, scope: !11) +// CHECK:STDOUT: !20 = !{!21, !21, i64 0} +// CHECK:STDOUT: !21 = !{!"p1 _ZTS9NeedThunk", !22, i64 0} +// CHECK:STDOUT: !22 = !{!"any pointer", !9, i64 0} +// CHECK:STDOUT: !23 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:Copy.fdeb6dbda014bd1f.Core:NeedThunk.Cpp", scope: null, file: !24, line: 4, type: !25, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !27) +// CHECK:STDOUT: !24 = !DIFile(filename: "./need_thunk.h", directory: "") +// CHECK:STDOUT: !25 = !DISubroutineType(types: !26) +// CHECK:STDOUT: !26 = !{!14, !14} +// CHECK:STDOUT: !27 = !{!28} +// CHECK:STDOUT: !28 = !DILocalVariable(arg: 1, scope: !23, type: !14) +// CHECK:STDOUT: !29 = !DILocation(line: 4, column: 3, scope: !23) +// CHECK:STDOUT: !30 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:Destroy.91afe58d20fe9768.Core:NeedThunk.Cpp", scope: null, file: !24, line: 5, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !31) +// CHECK:STDOUT: !31 = !{!32} +// CHECK:STDOUT: !32 = !DILocalVariable(arg: 1, scope: !30, type: !14) +// CHECK:STDOUT: !33 = !DILocation(line: 5, column: 3, scope: !30) diff --git a/toolchain/lower/testdata/interop/cpp/void.carbon b/toolchain/lower/testdata/interop/cpp/void.carbon index 7e4ee2c6eec7..7f76343d278f 100644 --- a/toolchain/lower/testdata/interop/cpp/void.carbon +++ b/toolchain/lower/testdata/interop/cpp/void.carbon @@ -182,7 +182,7 @@ fn ConvertFromConstVoidPtr(p: const Cpp.void*) -> const i32* { // CHECK:STDOUT: define linkonce_odr ptr @"_CConvert.81a1ecd9155a3498:OptionalAs.f58b2ba767714873.Core.030cb6453373b89b"(ptr %self) #0 !dbg !83 { // CHECK:STDOUT: %temp = alloca ptr, align 8, !dbg !86 // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %temp), !dbg !86 -// CHECK:STDOUT: %1 = call ptr @"_CConvert:thunk.e8f8f92d3d08d149:ImplicitAs.ffd58aeb29886b72.Core.b88d1103f417c6d4"(ptr %self), !dbg !86 +// CHECK:STDOUT: %1 = call ptr @"_CConvert:thunk:ImplicitAs.a2a0c15925bee468.Core:e8f8f92d3d08d149:ImplicitAs.ffd58aeb29886b72.Core.b88d1103f417c6d4"(ptr %self), !dbg !86 // CHECK:STDOUT: store ptr %1, ptr %temp, align 8, !dbg !86 // CHECK:STDOUT: %2 = load ptr, ptr %temp, align 8, !dbg !86 // CHECK:STDOUT: %3 = call ptr @_CSome.Optional.Core.f238af349d589061(ptr %2), !dbg !87 @@ -196,7 +196,7 @@ fn ConvertFromConstVoidPtr(p: const Cpp.void*) -> const i32* { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind -// CHECK:STDOUT: define linkonce_odr ptr @"_CConvert:thunk.e8f8f92d3d08d149:ImplicitAs.ffd58aeb29886b72.Core.b88d1103f417c6d4"(ptr %self) #3 !dbg !94 { +// CHECK:STDOUT: define linkonce_odr ptr @"_CConvert:thunk:ImplicitAs.a2a0c15925bee468.Core:e8f8f92d3d08d149:ImplicitAs.ffd58aeb29886b72.Core.b88d1103f417c6d4"(ptr %self) #3 !dbg !94 { // CHECK:STDOUT: ret ptr %self, !dbg !98 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -336,7 +336,7 @@ fn ConvertFromConstVoidPtr(p: const Cpp.void*) -> const i32* { // CHECK:STDOUT: !91 = !DILocalVariable(arg: 1, scope: !89, type: !14) // CHECK:STDOUT: !92 = !DILocation(line: 31, column: 12, scope: !89) // CHECK:STDOUT: !93 = !DILocation(line: 31, column: 5, scope: !89) -// CHECK:STDOUT: !94 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert:thunk.e8f8f92d3d08d149:ImplicitAs.ffd58aeb29886b72.Core.b88d1103f417c6d4", scope: null, file: !95, line: 40, type: !56, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !96) +// CHECK:STDOUT: !94 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert:thunk:ImplicitAs.a2a0c15925bee468.Core:e8f8f92d3d08d149:ImplicitAs.ffd58aeb29886b72.Core.b88d1103f417c6d4", scope: null, file: !95, line: 40, type: !56, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !96) // CHECK:STDOUT: !95 = !DIFile(filename: "{{.*}}/prelude/types/cpp/void.carbon", directory: "") // CHECK:STDOUT: !96 = !{!97} // CHECK:STDOUT: !97 = !DILocalVariable(arg: 1, scope: !94, type: !14) diff --git a/toolchain/lower/testdata/operators/increment.carbon b/toolchain/lower/testdata/operators/increment.carbon index 105740d85cc8..8abb35562dc0 100644 --- a/toolchain/lower/testdata/operators/increment.carbon +++ b/toolchain/lower/testdata/operators/increment.carbon @@ -44,12 +44,12 @@ fn IncrSigned() { // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind // CHECK:STDOUT: define linkonce_odr void @"_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8"(ptr %self) #0 !dbg !17 { -// CHECK:STDOUT: call void @"_COp:thunk.Int.9452f4c51951679b.Core:AddAssignWith.c820bd8c65a452f9.Core.bb7b2a0b30fd4cda"(ptr %self, i32 1), !dbg !21 +// CHECK:STDOUT: call void @"_COp:thunk:AddAssignWith.808ff30fe61f0791.Core:Int.9452f4c51951679b.Core:AddAssignWith.c820bd8c65a452f9.Core.bb7b2a0b30fd4cda"(ptr %self, i32 1), !dbg !21 // CHECK:STDOUT: ret void, !dbg !22 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind -// CHECK:STDOUT: define linkonce_odr void @"_COp:thunk.Int.9452f4c51951679b.Core:AddAssignWith.c820bd8c65a452f9.Core.bb7b2a0b30fd4cda"(ptr %self, i32 %other) #2 !dbg !23 { +// CHECK:STDOUT: define linkonce_odr void @"_COp:thunk:AddAssignWith.808ff30fe61f0791.Core:Int.9452f4c51951679b.Core:AddAssignWith.c820bd8c65a452f9.Core.bb7b2a0b30fd4cda"(ptr %self, i32 %other) #2 !dbg !23 { // CHECK:STDOUT: %1 = call i32 @"_CConvert.1f02987e9673cc00:ImplicitAs.d993a5132e000405.Core.dc9462e6da0d394c"(i32 %other), !dbg !29 // CHECK:STDOUT: %2 = load i32, ptr %self, align 4, !dbg !30 // CHECK:STDOUT: %3 = add i32 %2, %1, !dbg !30 @@ -98,7 +98,7 @@ fn IncrSigned() { // CHECK:STDOUT: !20 = !DILocalVariable(arg: 1, scope: !17, type: !13) // CHECK:STDOUT: !21 = !DILocation(line: 365, column: 5, scope: !17) // CHECK:STDOUT: !22 = !DILocation(line: 363, column: 3, scope: !17) -// CHECK:STDOUT: !23 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk.Int.9452f4c51951679b.Core:AddAssignWith.c820bd8c65a452f9.Core.bb7b2a0b30fd4cda", scope: null, file: !18, line: 299, type: !24, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !26) +// CHECK:STDOUT: !23 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:AddAssignWith.808ff30fe61f0791.Core:Int.9452f4c51951679b.Core:AddAssignWith.c820bd8c65a452f9.Core.bb7b2a0b30fd4cda", scope: null, file: !18, line: 299, type: !24, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !26) // CHECK:STDOUT: !24 = !DISubroutineType(types: !25) // CHECK:STDOUT: !25 = !{null, !13, !13} // CHECK:STDOUT: !26 = !{!27, !28} diff --git a/toolchain/sem_ir/BUILD b/toolchain/sem_ir/BUILD index bad6f8e23007..22e4e9bd9d66 100644 --- a/toolchain/sem_ir/BUILD +++ b/toolchain/sem_ir/BUILD @@ -129,6 +129,7 @@ cc_library( "pattern.h", "require_impls.h", "struct_type_field.h", + "thunk.h", "type.h", "type_info.h", "type_iterator.h", diff --git a/toolchain/sem_ir/file.cpp b/toolchain/sem_ir/file.cpp index 7d1867dd5b77..aa6b89ab0548 100644 --- a/toolchain/sem_ir/file.cpp +++ b/toolchain/sem_ir/file.cpp @@ -38,6 +38,7 @@ File::File(const Parse::Tree* parse_tree, CheckIRId check_ir_id, cpp_global_vars_(check_ir_id), functions_(check_ir_id), cpp_overload_sets_(check_ir_id), + thunks_(check_ir_id), classes_(check_ir_id), interfaces_(check_ir_id), named_constraints_(check_ir_id), @@ -189,6 +190,7 @@ auto File::CollectMemUsage(MemUsage& mem_usage, llvm::StringRef label) const mem_usage.Collect(MemUsage::ConcatLabel(label, "cpp_global_vars_"), cpp_global_vars_); mem_usage.Collect(MemUsage::ConcatLabel(label, "functions_"), functions_); + mem_usage.Collect(MemUsage::ConcatLabel(label, "thunks_"), thunks_); mem_usage.Collect(MemUsage::ConcatLabel(label, "classes_"), classes_); mem_usage.Collect(MemUsage::ConcatLabel(label, "interfaces_"), interfaces_); mem_usage.Collect(MemUsage::ConcatLabel(label, "impls_"), impls_); diff --git a/toolchain/sem_ir/file.h b/toolchain/sem_ir/file.h index d70313a483f8..81541b3b0960 100644 --- a/toolchain/sem_ir/file.h +++ b/toolchain/sem_ir/file.h @@ -41,6 +41,7 @@ #include "toolchain/sem_ir/singleton_insts.h" #include "toolchain/sem_ir/specific_interface.h" #include "toolchain/sem_ir/struct_type_field.h" +#include "toolchain/sem_ir/thunk.h" #include "toolchain/sem_ir/type.h" #include "toolchain/sem_ir/type_info.h" #include "toolchain/sem_ir/vtable.h" @@ -174,6 +175,8 @@ class File : public Printable { auto cpp_overload_sets() const -> const CppOverloadSetStore& { return cpp_overload_sets_; } + auto thunks() -> ThunkStore& { return thunks_; } + auto thunks() const -> const ThunkStore& { return thunks_; } auto classes() -> ClassStore& { return classes_; } auto classes() const -> const ClassStore& { return classes_; } auto interfaces() -> InterfaceStore& { return interfaces_; } @@ -334,6 +337,9 @@ class File : public Printable { // Storage for CppOverloadSet. CppOverloadSetStore cpp_overload_sets_; + // Storage for thunk info records. + ThunkStore thunks_; + // Storage for classes. ClassStore classes_; diff --git a/toolchain/sem_ir/formatter.cpp b/toolchain/sem_ir/formatter.cpp index 684ba9966b16..bca624bed22d 100644 --- a/toolchain/sem_ir/formatter.cpp +++ b/toolchain/sem_ir/formatter.cpp @@ -569,9 +569,20 @@ auto Formatter::FormatFunction(FunctionId id, const Function& fn) -> void { /*use_hex_escapes=*/true) << "\""; } - if (fn.thunk_decl_id().has_value()) { + if (fn.thunk_id().has_value()) { out() << " [thunk "; - FormatArg(fn.thunk_decl_id()); + const auto& thunk_info = sem_ir_->thunks().Get(fn.thunk_id()); + FormatArg(thunk_info.callee_id); + if (thunk_info.signature_id.has_value()) { + out() << " for "; + FormatName(sem_ir_->functions() + .Get(thunk_info.signature_id) + .first_owning_decl_id); + if (thunk_info.specific_id.has_value()) { + out() << ", "; + FormatName(thunk_info.specific_id); + } + } out() << "]"; } diff --git a/toolchain/sem_ir/function.h b/toolchain/sem_ir/function.h index 3b10777871f4..535d4b65c608 100644 --- a/toolchain/sem_ir/function.h +++ b/toolchain/sem_ir/function.h @@ -212,12 +212,11 @@ struct Function : public EntityWithParamsBase, : BuiltinFunctionKind::None; } - // Returns the declaration that this is a non C++ thunk for, or None if this - // function is not a thunk. - auto thunk_decl_id() const -> InstId { + // Returns the ThunkId for this thunk function, or None if it's not a thunk. + auto thunk_id() const -> ThunkId { return special_function_kind == SpecialFunctionKind::Thunk - ? InstId(special_function_kind_data.index) - : InstId::None; + ? ThunkId(special_function_kind_data.index) + : ThunkId::None; } // Returns the declaration of the thunk that should be called to call this @@ -282,10 +281,10 @@ struct Function : public EntityWithParamsBase, } // Sets that this function is a thunk. - auto SetThunk(InstId decl_id) -> void { + auto SetThunk(ThunkId thunk_id) -> void { CARBON_CHECK(special_function_kind == SpecialFunctionKind::None); special_function_kind = SpecialFunctionKind::Thunk; - special_function_kind_data = AnyRawId(decl_id.index); + special_function_kind_data = AnyRawId(thunk_id.index); } // Sets that this function is a C++ thunk. diff --git a/toolchain/sem_ir/ids.h b/toolchain/sem_ir/ids.h index 2010be67498d..81b5307e3d06 100644 --- a/toolchain/sem_ir/ids.h +++ b/toolchain/sem_ir/ids.h @@ -307,6 +307,13 @@ struct FunctionId : public IdBase { using IdBase::IdBase; }; +// The ID of a thunk info record. +struct ThunkId : public IdBase { + static constexpr llvm::StringLiteral Label = "thunk"; + + using IdBase::IdBase; +}; + // The ID of an IR within the set of all IRs being evaluated in the current // check execution. struct CheckIRId : public IdBase { diff --git a/toolchain/sem_ir/mangler.cpp b/toolchain/sem_ir/mangler.cpp index 9558757b9e81..6ec33877c4b9 100644 --- a/toolchain/sem_ir/mangler.cpp +++ b/toolchain/sem_ir/mangler.cpp @@ -13,6 +13,7 @@ #include "toolchain/sem_ir/pattern.h" #include "toolchain/sem_ir/specific_interface.h" #include "toolchain/sem_ir/specific_named_constraint.h" +#include "toolchain/sem_ir/thunk.h" #include "toolchain/sem_ir/typed_insts.h" namespace Carbon::SemIR { @@ -25,8 +26,9 @@ auto Mangler::MangleNameId(llvm::raw_ostream& os, SemIR::NameId name_id) } auto Mangler::MangleInverseQualifiedNameScope(llvm::raw_ostream& os, - SemIR::NameScopeId name_scope_id) - -> void { + SemIR::NameScopeId name_scope_id, + SemIR::SpecificId specific_id, + char initial_prefix) -> void { // Maintain a stack of names for delayed rendering of interface impls. struct NameEntry { SemIR::NameScopeId name_scope_id; @@ -40,8 +42,8 @@ auto Mangler::MangleInverseQualifiedNameScope(llvm::raw_ostream& os, }; llvm::SmallVector names_to_render; names_to_render.push_back({.name_scope_id = name_scope_id, - .specific_id = SemIR::SpecificId::None, - .prefix = '.'}); + .specific_id = specific_id, + .prefix = initial_prefix}); while (!names_to_render.empty()) { auto [name_scope_id, specific_id, prefix] = names_to_render.pop_back_val(); if (!name_scope_id.has_value()) { @@ -67,6 +69,7 @@ auto Mangler::MangleInverseQualifiedNameScope(llvm::raw_ostream& os, continue; } const auto& name_scope = sem_ir().name_scopes().Get(name_scope_id); + auto next_scope_id = name_scope.parent_scope_id(); CARBON_KIND_SWITCH(sem_ir().insts().Get(name_scope.inst_id())) { case CARBON_KIND(SemIR::ImplDecl impl_decl): { const auto& impl = sem_ir().impls().Get(impl_decl.impl_id); @@ -107,7 +110,7 @@ auto Mangler::MangleInverseQualifiedNameScope(llvm::raw_ostream& os, .specific_id = class_type.specific_id, .prefix = '.'}); - MangleUnqualifiedClass(os, class_info, class_type.specific_id); + MangleUnqualifiedName(os, class_info, class_type.specific_id); break; } case SemIR::AutoType::Kind: @@ -148,14 +151,24 @@ auto Mangler::MangleInverseQualifiedNameScope(llvm::raw_ostream& os, continue; } case CARBON_KIND(SemIR::ClassDecl class_decl): { - MangleUnqualifiedClass(os, sem_ir().classes().Get(class_decl.class_id), - specific_id); + MangleUnqualifiedName(os, sem_ir().classes().Get(class_decl.class_id), + specific_id); break; } case CARBON_KIND(SemIR::InterfaceDecl interface_decl): { - MangleNameId( - os, sem_ir().interfaces().Get(interface_decl.interface_id).name_id); - MangleSpecificId(os, specific_id); + MangleUnqualifiedName( + os, sem_ir().interfaces().Get(interface_decl.interface_id), + specific_id); + break; + } + case CARBON_KIND(SemIR::InterfaceWithSelfDecl interface_with_self_decl): { + MangleUnqualifiedName( + os, + sem_ir().interfaces().Get(interface_with_self_decl.interface_id), + specific_id); + // Skip the enclosing `InterfaceDecl` as we already mangled its name. + next_scope_id = + sem_ir().name_scopes().Get(next_scope_id).parent_scope_id(); break; } case SemIR::Namespace::Kind: { @@ -167,7 +180,7 @@ auto Mangler::MangleInverseQualifiedNameScope(llvm::raw_ostream& os, break; } if (!name_scope.is_imported_package()) { - names_to_render.push_back({.name_scope_id = name_scope.parent_scope_id(), + names_to_render.push_back({.name_scope_id = next_scope_id, .specific_id = SemIR::SpecificId::None, .prefix = '.'}); } @@ -190,6 +203,7 @@ auto Mangler::Mangle(SemIR::FunctionId function_id, os << "_C"; MangleNameId(os, function.name_id); + char separator = '.'; // For a special function, add a marker to disambiguate. switch (function.special_function_kind) { @@ -206,6 +220,20 @@ auto Mangler::Mangle(SemIR::FunctionId function_id, break; case SemIR::Function::SpecialFunctionKind::Thunk: os << ":thunk"; + if (function.thunk_id().has_value()) { + const auto& thunk_info = sem_ir().thunks().Get(function.thunk_id()); + if (thunk_info.signature_id.has_value()) { + const auto& sig_fn = + sem_ir().functions().Get(thunk_info.signature_id); + // If this ever becomes possible, we'll need to include the signature + // name in the mangling too. + CARBON_CHECK(sig_fn.name_id == function.name_id, + "Thunk name mismatches signature name"); + MangleInverseQualifiedNameScope(os, sig_fn.parent_scope_id, + thunk_info.specific_id, ':'); + separator = ':'; + } + } break; case SemIR::Function::SpecialFunctionKind::Builtin: @@ -217,7 +245,8 @@ auto Mangler::Mangle(SemIR::FunctionId function_id, // TODO: If the function is private, also include the library name as part of // the mangling. - MangleInverseQualifiedNameScope(os, function.parent_scope_id); + MangleInverseQualifiedNameScope(os, function.parent_scope_id, + SemIR::SpecificId::None, separator); MangleSpecificId(os, specific_id); @@ -281,10 +310,10 @@ auto Mangler::MangleVTable(const SemIR::Class& class_info, return os.TakeStr(); } -auto Mangler::MangleUnqualifiedClass(llvm::raw_ostream& os, - const SemIR::Class& class_info, - SemIR::SpecificId specific_id) -> void { - MangleNameId(os, class_info.name_id); +auto Mangler::MangleUnqualifiedName(llvm::raw_ostream& os, + const SemIR::EntityWithParamsBase& entity, + SemIR::SpecificId specific_id) -> void { + MangleNameId(os, entity.name_id); MangleSpecificId(os, specific_id); } } // namespace Carbon::SemIR diff --git a/toolchain/sem_ir/mangler.h b/toolchain/sem_ir/mangler.h index 396c02520eb2..dc8398c8289b 100644 --- a/toolchain/sem_ir/mangler.h +++ b/toolchain/sem_ir/mangler.h @@ -51,15 +51,16 @@ class Mangler { // Mangle this qualified name with inner scope first, working outwards. This // may reduce the incidence of common prefixes in the name mangling. (i.e.: // every standard library name won't have a common prefix that has to be - // skipped and compared before getting to the interesting part) - auto MangleInverseQualifiedNameScope(llvm::raw_ostream& os, - SemIR::NameScopeId name_scope_id) - -> void; + // skipped and compared before getting to the interesting part). + auto MangleInverseQualifiedNameScope( + llvm::raw_ostream& os, SemIR::NameScopeId name_scope_id, + SemIR::SpecificId specific_id = SemIR::SpecificId::None, + char initial_prefix = '.') -> void; - // Mangle the unqualified name of the specified `Class`. - auto MangleUnqualifiedClass(llvm::raw_ostream& os, - const SemIR::Class& class_info, - SemIR::SpecificId specific_id) -> void; + // Mangle the unqualified name of the specified entity. + auto MangleUnqualifiedName(llvm::raw_ostream& os, + const SemIR::EntityWithParamsBase& entity, + SemIR::SpecificId specific_id) -> void; // Generates a mangled name using Clang mangling for imported C++ functions. auto MangleCppClang(const clang::NamedDecl* decl) -> std::string; diff --git a/toolchain/sem_ir/thunk.h b/toolchain/sem_ir/thunk.h new file mode 100644 index 000000000000..a0844f3c547f --- /dev/null +++ b/toolchain/sem_ir/thunk.h @@ -0,0 +1,25 @@ +// 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 + +#ifndef CARBON_TOOLCHAIN_SEM_IR_THUNK_H_ +#define CARBON_TOOLCHAIN_SEM_IR_THUNK_H_ + +#include "toolchain/base/value_store.h" +#include "toolchain/sem_ir/ids.h" + +namespace Carbon::SemIR { + +// Metadata tracking information about a thunk's signature, callee, and specific +// generic parameters. +struct ThunkInfo { + InstId callee_id; + FunctionId signature_id = FunctionId::None; + SpecificId specific_id = SpecificId::None; +}; + +using ThunkStore = ValueStore>; + +} // namespace Carbon::SemIR + +#endif // CARBON_TOOLCHAIN_SEM_IR_THUNK_H_