diff --git a/toolchain/check/cpp/operators.cpp b/toolchain/check/cpp/operators.cpp index 7b7c9a571d47..8170006bf631 100644 --- a/toolchain/check/cpp/operators.cpp +++ b/toolchain/check/cpp/operators.cpp @@ -738,11 +738,6 @@ static auto GetAsCppFunctionDecl(Context& context, SemIR::InstId inst_id) : nullptr; } -auto IsCppOperatorMethod(Context& context, SemIR::InstId inst_id) -> bool { - auto* function_decl = GetAsCppFunctionDecl(context, inst_id); - return function_decl && IsCppOperatorMethodDecl(function_decl); -} - auto IsCppConstructorOrNonMethod(Context& context, SemIR::InstId inst_id) -> bool { auto* function_decl = GetAsCppFunctionDecl(context, inst_id); diff --git a/toolchain/check/cpp/operators.h b/toolchain/check/cpp/operators.h index 8f9f752d122f..19edf9094ba2 100644 --- a/toolchain/check/cpp/operators.h +++ b/toolchain/check/cpp/operators.h @@ -30,11 +30,6 @@ auto LookupCppOperator(Context& context, SemIR::LocId loc_id, Operator op, // Returns whether the decl is an operator member function. auto IsCppOperatorMethodDecl(clang::Decl* decl) -> bool; -// Returns whether the specified instruction refers to a C++ overloaded operator -// that is a method. If so, the first operand will be passed as `self` rather -// than as the first argument. -auto IsCppOperatorMethod(Context& context, SemIR::InstId inst_id) -> bool; - // Returns whether the specified instruction refers to a C++ constructor or // non-operator method. If so, when mapping from a Carbon interface to a C++ // call, we pass a `self` parameter as the first argument instead. diff --git a/toolchain/check/operator.cpp b/toolchain/check/operator.cpp index c6f97bbf0569..43b86765f6c5 100644 --- a/toolchain/check/operator.cpp +++ b/toolchain/check/operator.cpp @@ -70,8 +70,6 @@ auto BuildUnaryOperator(Context& context, SemIR::LocId loc_id, Operator op, return SemIR::ErrorInst::InstId; } - SemIR::InstId op_fn_id = SemIR::InstId::None; - // For unary operators with a C++ class as the operand, try to import and call // the C++ operator. // TODO: Change impl lookup instead. See @@ -80,20 +78,16 @@ auto BuildUnaryOperator(Context& context, SemIR::LocId loc_id, Operator op, llvm::any_of(op.interface_args_ref, [&](SemIR::InstId arg_id) { return IsCppClassType(context, arg_id); })) { - op_fn_id = LookupCppOperator(context, loc_id, op, {operand_id}); - - // If C++ operator lookup found a non-method operator, call it with one call - // argument. Otherwise fall through to call it with a self argument. - if (op_fn_id.has_value() && !IsCppOperatorMethod(context, op_fn_id)) { - return PerformCall(context, loc_id, op_fn_id, {operand_id}, + if (auto cpp_op_fn_id = + LookupCppOperator(context, loc_id, op, {operand_id}); + cpp_op_fn_id.has_value()) { + return PerformCall(context, loc_id, cpp_op_fn_id, {operand_id}, /*is_desugared=*/true); } } - if (!op_fn_id.has_value()) { - // Look up the operator function. - op_fn_id = GetOperatorOpFunction(context, loc_id, op); - } + // Look up the operator function. + auto op_fn_id = GetOperatorOpFunction(context, loc_id, op); // Form `operand.(Op)`. auto bound_op_id = @@ -118,8 +112,6 @@ auto BuildBinaryOperator(Context& context, SemIR::LocId loc_id, Operator op, return SemIR::ErrorInst::InstId; } - SemIR::InstId op_fn_id = SemIR::InstId::None; - // For binary operators with a C++ class as at least one of the operands, try // to import and call the C++ operator. // TODO: Instead of hooking this here, change impl lookup, so that a generic @@ -132,21 +124,16 @@ auto BuildBinaryOperator(Context& context, SemIR::LocId loc_id, Operator op, llvm::any_of(op.interface_args_ref, [&](SemIR::InstId arg_id) { return IsCppClassType(context, arg_id); })) { - op_fn_id = LookupCppOperator(context, loc_id, op, {lhs_id, rhs_id}); - - // If C++ operator lookup found a non-method operator, call it with two call - // arguments. Otherwise fall through to call it with a self argument and one - // call argument. - if (op_fn_id.has_value() && !IsCppOperatorMethod(context, op_fn_id)) { - return PerformCall(context, loc_id, op_fn_id, {lhs_id, rhs_id}, + if (auto cpp_op_fn_id = + LookupCppOperator(context, loc_id, op, {lhs_id, rhs_id}); + cpp_op_fn_id.has_value()) { + return PerformCall(context, loc_id, cpp_op_fn_id, {lhs_id, rhs_id}, /*is_desugared=*/true); } } - if (!op_fn_id.has_value()) { - // Look up the operator function. - op_fn_id = GetOperatorOpFunction(context, loc_id, op); - } + // Look up the operator function. + auto op_fn_id = GetOperatorOpFunction(context, loc_id, op); // Form `lhs.(Op)`. auto bound_op_id = diff --git a/toolchain/check/testdata/interop/cpp/impls/as.carbon b/toolchain/check/testdata/interop/cpp/impls/as.carbon index cbd7d4c113f2..b87040e506c0 100644 --- a/toolchain/check/testdata/interop/cpp/impls/as.carbon +++ b/toolchain/check/testdata/interop/cpp/impls/as.carbon @@ -135,8 +135,6 @@ fn ConversionExplicit(s: Cpp.ConditionallyExplicitFalse) { // CHECK:STDOUT: %Source: type = class_type @Source [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %Dest: type = class_type @Dest [concrete] -// CHECK:STDOUT: %Source.cpp_operator.type: type = fn_type @Source.cpp_operator [concrete] -// CHECK:STDOUT: %Source.cpp_operator: %Source.cpp_operator.type = struct_value () [concrete] // CHECK:STDOUT: %ptr.ca8: type = ptr_type %Dest [concrete] // CHECK:STDOUT: %Dest__carbon_thunk.type.eb4c5e.1: type = fn_type @Dest__carbon_thunk.1 [concrete] // CHECK:STDOUT: %Dest__carbon_thunk.c8e433.1: %Dest__carbon_thunk.type.eb4c5e.1 = struct_value () [concrete] @@ -164,8 +162,6 @@ fn ConversionExplicit(s: Cpp.ConditionallyExplicitFalse) { // CHECK:STDOUT: %ExplicitConstructor.Op.type: type = fn_type @ExplicitConstructor.Op [concrete] // CHECK:STDOUT: %ExplicitConstructor.Op: %ExplicitConstructor.Op.type = struct_value () [concrete] // CHECK:STDOUT: %ExplicitConversion: type = class_type @ExplicitConversion [concrete] -// CHECK:STDOUT: %ExplicitConversion.cpp_operator.type: type = fn_type @ExplicitConversion.cpp_operator [concrete] -// CHECK:STDOUT: %ExplicitConversion.cpp_operator: %ExplicitConversion.cpp_operator.type = struct_value () [concrete] // CHECK:STDOUT: %Dest__carbon_thunk.type.eb4c5e.2: type = fn_type @Dest__carbon_thunk.2 [concrete] // CHECK:STDOUT: %Dest__carbon_thunk.c8e433.2: %Dest__carbon_thunk.type.eb4c5e.2 = struct_value () [concrete] // CHECK:STDOUT: } @@ -182,11 +178,6 @@ fn ConversionExplicit(s: Cpp.ConditionallyExplicitFalse) { // CHECK:STDOUT: } // CHECK:STDOUT: %Source.decl: type = class_decl @Source [concrete = constants.%Source] {} {} // CHECK:STDOUT: %Dest.decl: type = class_decl @Dest [concrete = constants.%Dest] {} {} -// CHECK:STDOUT: %Source.cpp_operator.decl: %Source.cpp_operator.type = fn_decl @Source.cpp_operator [concrete = constants.%Source.cpp_operator] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } // CHECK:STDOUT: %Dest__carbon_thunk.decl.a8fbc1.1: %Dest__carbon_thunk.type.eb4c5e.1 = fn_decl @Dest__carbon_thunk.1 [concrete = constants.%Dest__carbon_thunk.c8e433.1] { // CHECK:STDOUT: // CHECK:STDOUT: } { @@ -221,11 +212,6 @@ fn ConversionExplicit(s: Cpp.ConditionallyExplicitFalse) { // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: %ExplicitConversion.decl: type = class_decl @ExplicitConversion [concrete = constants.%ExplicitConversion] {} {} -// CHECK:STDOUT: %ExplicitConversion.cpp_operator.decl: %ExplicitConversion.cpp_operator.type = fn_decl @ExplicitConversion.cpp_operator [concrete = constants.%ExplicitConversion.cpp_operator] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } // CHECK:STDOUT: %Dest__carbon_thunk.decl.a8fbc1.2: %Dest__carbon_thunk.type.eb4c5e.2 = fn_decl @Dest__carbon_thunk.2 [concrete = constants.%Dest__carbon_thunk.c8e433.2] { // CHECK:STDOUT: // CHECK:STDOUT: } { @@ -238,7 +224,6 @@ fn ConversionExplicit(s: Cpp.ConditionallyExplicitFalse) { // CHECK:STDOUT: %s.ref: %Source = name_ref s, %s // CHECK:STDOUT: %Cpp.ref.loc8: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %Dest.ref: type = name_ref Dest, imports.%Dest.decl [concrete = constants.%Dest] -// CHECK:STDOUT: %Source.cpp_operator.bound: = bound_method %s.ref, imports.%Source.cpp_operator.decl // CHECK:STDOUT: %.loc8_5.1: ref %Dest = temporary_storage // CHECK:STDOUT: %addr: %ptr.ca8 = addr_of %.loc8_5.1 // CHECK:STDOUT: %Dest__carbon_thunk.call: init %empty_tuple.type = call imports.%Dest__carbon_thunk.decl.a8fbc1.1(%s.ref, %addr) @@ -300,7 +285,6 @@ fn ConversionExplicit(s: Cpp.ConditionallyExplicitFalse) { // CHECK:STDOUT: %s.ref: %ExplicitConversion = name_ref s, %s // CHECK:STDOUT: %Cpp.ref.loc26: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %Dest.ref: type = name_ref Dest, imports.%Dest.decl [concrete = constants.%Dest] -// CHECK:STDOUT: %ExplicitConversion.cpp_operator.bound: = bound_method %s.ref, imports.%ExplicitConversion.cpp_operator.decl // CHECK:STDOUT: %.loc26_5.1: ref %Dest = temporary_storage // CHECK:STDOUT: %addr: %ptr.ca8 = addr_of %.loc26_5.1 // CHECK:STDOUT: %Dest__carbon_thunk.call: init %empty_tuple.type = call imports.%Dest__carbon_thunk.decl.a8fbc1.2(%s.ref, %addr) @@ -339,8 +323,6 @@ fn ConversionExplicit(s: Cpp.ConditionallyExplicitFalse) { // CHECK:STDOUT: %ConditionallyExplicit.Op.4dca31.2: %ConditionallyExplicit.Op.type.83af6e.2 = struct_value () [concrete] // CHECK:STDOUT: %Dest: type = class_type @Dest [concrete] // CHECK:STDOUT: %pattern_type.b72: type = pattern_type %Dest [concrete] -// CHECK:STDOUT: %ConditionallyExplicit.cpp_operator.type: type = fn_type @ConditionallyExplicit.cpp_operator [concrete] -// CHECK:STDOUT: %ConditionallyExplicit.cpp_operator: %ConditionallyExplicit.cpp_operator.type = struct_value () [concrete] // CHECK:STDOUT: %ptr.ca8: type = ptr_type %Dest [concrete] // CHECK:STDOUT: %Dest__carbon_thunk.type: type = fn_type @Dest__carbon_thunk [concrete] // CHECK:STDOUT: %Dest__carbon_thunk: %Dest__carbon_thunk.type = struct_value () [concrete] @@ -382,11 +364,6 @@ fn ConversionExplicit(s: Cpp.ConditionallyExplicitFalse) { // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: %Dest.decl: type = class_decl @Dest [concrete = constants.%Dest] {} {} -// CHECK:STDOUT: %ConditionallyExplicit.cpp_operator.decl: %ConditionallyExplicit.cpp_operator.type = fn_decl @ConditionallyExplicit.cpp_operator [concrete = constants.%ConditionallyExplicit.cpp_operator] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } // CHECK:STDOUT: %Dest__carbon_thunk.decl: %Dest__carbon_thunk.type = fn_decl @Dest__carbon_thunk [concrete = constants.%Dest__carbon_thunk] { // CHECK:STDOUT: // CHECK:STDOUT: } { @@ -473,7 +450,6 @@ fn ConversionExplicit(s: Cpp.ConditionallyExplicitFalse) { // CHECK:STDOUT: %Cpp.ref.loc21: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %Dest.ref.loc21: type = name_ref Dest, imports.%Dest.decl [concrete = constants.%Dest] // CHECK:STDOUT: } -// CHECK:STDOUT: %ConditionallyExplicit.cpp_operator.bound.loc21: = bound_method %s.ref.loc21, imports.%ConditionallyExplicit.cpp_operator.decl // CHECK:STDOUT: %.loc21_21.1: ref %Dest = temporary_storage // CHECK:STDOUT: %addr.loc21: %ptr.ca8 = addr_of %.loc21_21.1 // CHECK:STDOUT: %Dest__carbon_thunk.call.loc21: init %empty_tuple.type = call imports.%Dest__carbon_thunk.decl(%s.ref.loc21, %addr.loc21) @@ -485,7 +461,6 @@ fn ConversionExplicit(s: Cpp.ConditionallyExplicitFalse) { // CHECK:STDOUT: %s.ref.loc22: %ConditionallyExplicit.3cd = name_ref s, %s // CHECK:STDOUT: %Cpp.ref.loc22: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %Dest.ref.loc22: type = name_ref Dest, imports.%Dest.decl [concrete = constants.%Dest] -// CHECK:STDOUT: %ConditionallyExplicit.cpp_operator.bound.loc22: = bound_method %s.ref.loc22, imports.%ConditionallyExplicit.cpp_operator.decl // CHECK:STDOUT: %.loc22_5.1: ref %Dest = temporary_storage // CHECK:STDOUT: %addr.loc22: %ptr.ca8 = addr_of %.loc22_5.1 // CHECK:STDOUT: %Dest__carbon_thunk.call.loc22: init %empty_tuple.type = call imports.%Dest__carbon_thunk.decl(%s.ref.loc22, %addr.loc22) @@ -509,7 +484,6 @@ fn ConversionExplicit(s: Cpp.ConditionallyExplicitFalse) { // CHECK:STDOUT: %s.ref: %ConditionallyExplicit.3cd = name_ref s, %s // CHECK:STDOUT: %Cpp.ref.loc28: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %Dest.ref: type = name_ref Dest, imports.%Dest.decl [concrete = constants.%Dest] -// CHECK:STDOUT: %ConditionallyExplicit.cpp_operator.bound: = bound_method %s.ref, imports.%ConditionallyExplicit.cpp_operator.decl // CHECK:STDOUT: %.loc28_5.1: ref %Dest = temporary_storage // CHECK:STDOUT: %addr: %ptr.ca8 = addr_of %.loc28_5.1 // CHECK:STDOUT: %Dest__carbon_thunk.call: init %empty_tuple.type = call imports.%Dest__carbon_thunk.decl(%s.ref, %addr) @@ -533,8 +507,6 @@ fn ConversionExplicit(s: Cpp.ConditionallyExplicitFalse) { // CHECK:STDOUT: %ConditionallyExplicit.3cd: type = class_type @ConditionallyExplicit.2 [concrete] // CHECK:STDOUT: %Dest.980: type = class_type @Dest [concrete] // CHECK:STDOUT: %pattern_type.b72: type = pattern_type %Dest.980 [concrete] -// CHECK:STDOUT: %ConditionallyExplicit.cpp_operator.type: type = fn_type @ConditionallyExplicit.cpp_operator [concrete] -// CHECK:STDOUT: %ConditionallyExplicit.cpp_operator: %ConditionallyExplicit.cpp_operator.type = struct_value () [concrete] // CHECK:STDOUT: %ptr.ca8: type = ptr_type %Dest.980 [concrete] // CHECK:STDOUT: %Dest__carbon_thunk.type: type = fn_type @Dest__carbon_thunk [concrete] // CHECK:STDOUT: %Dest__carbon_thunk: %Dest__carbon_thunk.type = struct_value () [concrete] @@ -556,11 +528,6 @@ fn ConversionExplicit(s: Cpp.ConditionallyExplicitFalse) { // CHECK:STDOUT: %ConditionallyExplicit.decl.6ab: type = class_decl @ConditionallyExplicit.1 [concrete = constants.%ConditionallyExplicit.9d4] {} {} // CHECK:STDOUT: %ConditionallyExplicit.decl.996: type = class_decl @ConditionallyExplicit.2 [concrete = constants.%ConditionallyExplicit.3cd] {} {} // CHECK:STDOUT: %Dest.decl: type = class_decl @Dest [concrete = constants.%Dest.980] {} {} -// CHECK:STDOUT: %ConditionallyExplicit.cpp_operator.decl: %ConditionallyExplicit.cpp_operator.type = fn_decl @ConditionallyExplicit.cpp_operator [concrete = constants.%ConditionallyExplicit.cpp_operator] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } // CHECK:STDOUT: %Dest__carbon_thunk.decl: %Dest__carbon_thunk.type = fn_decl @Dest__carbon_thunk [concrete = constants.%Dest__carbon_thunk] { // CHECK:STDOUT: // CHECK:STDOUT: } { @@ -598,7 +565,6 @@ fn ConversionExplicit(s: Cpp.ConditionallyExplicitFalse) { // CHECK:STDOUT: %Cpp.ref.loc21: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %Dest.ref: type = name_ref Dest, imports.%Dest.decl [concrete = constants.%Dest.980] // CHECK:STDOUT: } -// CHECK:STDOUT: %ConditionallyExplicit.cpp_operator.bound: = bound_method %s.ref, imports.%ConditionallyExplicit.cpp_operator.decl // CHECK:STDOUT: %.loc21_21.1: ref %Dest.980 = temporary_storage // CHECK:STDOUT: %addr: %ptr.ca8 = addr_of %.loc21_21.1 // CHECK:STDOUT: %Dest__carbon_thunk.call: init %empty_tuple.type = call imports.%Dest__carbon_thunk.decl(%s.ref, %addr) diff --git a/toolchain/check/testdata/interop/cpp/impls/implicit_as.carbon b/toolchain/check/testdata/interop/cpp/impls/implicit_as.carbon index 5e58c80c0bc3..12533f31efa4 100644 --- a/toolchain/check/testdata/interop/cpp/impls/implicit_as.carbon +++ b/toolchain/check/testdata/interop/cpp/impls/implicit_as.carbon @@ -418,8 +418,6 @@ fn InitFromStruct() { // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %Dest: type = class_type @Dest [concrete] // CHECK:STDOUT: %pattern_type.b72: type = pattern_type %Dest [concrete] -// CHECK:STDOUT: %Source.cpp_operator.type: type = fn_type @Source.cpp_operator [concrete] -// CHECK:STDOUT: %Source.cpp_operator: %Source.cpp_operator.type = struct_value () [concrete] // CHECK:STDOUT: %ptr.ca8: type = ptr_type %Dest [concrete] // CHECK:STDOUT: %Dest__carbon_thunk.type.eb4c5e.1: type = fn_type @Dest__carbon_thunk.1 [concrete] // CHECK:STDOUT: %Dest__carbon_thunk.c8e433.1: %Dest__carbon_thunk.type.eb4c5e.1 = struct_value () [concrete] @@ -428,8 +426,6 @@ fn InitFromStruct() { // CHECK:STDOUT: %Dest.Op.type: type = fn_type @Dest.Op [concrete] // CHECK:STDOUT: %Dest.Op: %Dest.Op.type = struct_value () [concrete] // CHECK:STDOUT: %NonConstConversion.689: type = class_type @NonConstConversion.1 [concrete] -// CHECK:STDOUT: %NonConstConversion.cpp_operator.type: type = fn_type @NonConstConversion.cpp_operator [concrete] -// CHECK:STDOUT: %NonConstConversion.cpp_operator: %NonConstConversion.cpp_operator.type = struct_value () [concrete] // CHECK:STDOUT: %Dest__carbon_thunk.type.eb4c5e.2: type = fn_type @Dest__carbon_thunk.2 [concrete] // CHECK:STDOUT: %Dest__carbon_thunk.c8e433.2: %Dest__carbon_thunk.type.eb4c5e.2 = struct_value () [concrete] // CHECK:STDOUT: %Source2: type = class_type @Source2 [concrete] @@ -456,11 +452,6 @@ fn InitFromStruct() { // CHECK:STDOUT: } // CHECK:STDOUT: %Source.decl: type = class_decl @Source [concrete = constants.%Source] {} {} // CHECK:STDOUT: %Dest.decl: type = class_decl @Dest [concrete = constants.%Dest] {} {} -// CHECK:STDOUT: %Source.cpp_operator.decl: %Source.cpp_operator.type = fn_decl @Source.cpp_operator [concrete = constants.%Source.cpp_operator] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } // CHECK:STDOUT: %Dest__carbon_thunk.decl.a8fbc1.1: %Dest__carbon_thunk.type.eb4c5e.1 = fn_decl @Dest__carbon_thunk.1 [concrete = constants.%Dest__carbon_thunk.c8e433.1] { // CHECK:STDOUT: // CHECK:STDOUT: } { @@ -472,11 +463,6 @@ fn InitFromStruct() { // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: %NonConstConversion.decl: type = class_decl @NonConstConversion.1 [concrete = constants.%NonConstConversion.689] {} {} -// CHECK:STDOUT: %NonConstConversion.cpp_operator.decl: %NonConstConversion.cpp_operator.type = fn_decl @NonConstConversion.cpp_operator [concrete = constants.%NonConstConversion.cpp_operator] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } // CHECK:STDOUT: %Dest__carbon_thunk.decl.a8fbc1.2: %Dest__carbon_thunk.type.eb4c5e.2 = fn_decl @Dest__carbon_thunk.2 [concrete = constants.%Dest__carbon_thunk.c8e433.2] { // CHECK:STDOUT: // CHECK:STDOUT: } { @@ -506,7 +492,6 @@ fn InitFromStruct() { // CHECK:STDOUT: %Cpp.ref.loc8: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %Dest.ref: type = name_ref Dest, imports.%Dest.decl [concrete = constants.%Dest] // CHECK:STDOUT: } -// CHECK:STDOUT: %Source.cpp_operator.bound: = bound_method %s.ref, imports.%Source.cpp_operator.decl // CHECK:STDOUT: %.loc8_21.1: ref %Dest = temporary_storage // CHECK:STDOUT: %addr: %ptr.ca8 = addr_of %.loc8_21.1 // CHECK:STDOUT: %Dest__carbon_thunk.call: init %empty_tuple.type = call imports.%Dest__carbon_thunk.decl.a8fbc1.1(%s.ref, %addr) @@ -533,7 +518,6 @@ fn InitFromStruct() { // CHECK:STDOUT: %Cpp.ref.loc14: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %Dest.ref: type = name_ref Dest, imports.%Dest.decl [concrete = constants.%Dest] // CHECK:STDOUT: } -// CHECK:STDOUT: %NonConstConversion.cpp_operator.bound: = bound_method %s.ref, imports.%NonConstConversion.cpp_operator.decl // CHECK:STDOUT: %.loc14_21.1: ref %Dest = temporary_storage // CHECK:STDOUT: %addr: %ptr.ca8 = addr_of %.loc14_21.1 // CHECK:STDOUT: %Dest__carbon_thunk.call: init %empty_tuple.type = call imports.%Dest__carbon_thunk.decl.a8fbc1.2(%s.ref, %addr) @@ -628,8 +612,6 @@ fn InitFromStruct() { // CHECK:STDOUT: %InaccessibleConversion: type = class_type @InaccessibleConversion [concrete] // CHECK:STDOUT: %Dest: type = class_type @Dest [concrete] // CHECK:STDOUT: %pattern_type.b72: type = pattern_type %Dest [concrete] -// CHECK:STDOUT: %InaccessibleConversion.cpp_operator.type: type = fn_type @InaccessibleConversion.cpp_operator [concrete] -// CHECK:STDOUT: %InaccessibleConversion.cpp_operator: %InaccessibleConversion.cpp_operator.type = struct_value () [concrete] // CHECK:STDOUT: %ptr.ca8: type = ptr_type %Dest [concrete] // CHECK:STDOUT: %Dest__carbon_thunk.type: type = fn_type @Dest__carbon_thunk [concrete] // CHECK:STDOUT: %Dest__carbon_thunk: %Dest__carbon_thunk.type = struct_value () [concrete] @@ -661,11 +643,6 @@ fn InitFromStruct() { // CHECK:STDOUT: } // CHECK:STDOUT: %InaccessibleConversion.decl: type = class_decl @InaccessibleConversion [concrete = constants.%InaccessibleConversion] {} {} // CHECK:STDOUT: %Dest.decl: type = class_decl @Dest [concrete = constants.%Dest] {} {} -// CHECK:STDOUT: %InaccessibleConversion.cpp_operator.decl: %InaccessibleConversion.cpp_operator.type = fn_decl @InaccessibleConversion.cpp_operator [concrete = constants.%InaccessibleConversion.cpp_operator] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } // CHECK:STDOUT: %Dest__carbon_thunk.decl: %Dest__carbon_thunk.type = fn_decl @Dest__carbon_thunk [concrete = constants.%Dest__carbon_thunk] { // CHECK:STDOUT: // CHECK:STDOUT: } { @@ -716,7 +693,6 @@ fn InitFromStruct() { // CHECK:STDOUT: %Cpp.ref.loc30: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %Dest.ref: type = name_ref Dest, imports.%Dest.decl [concrete = constants.%Dest] // CHECK:STDOUT: } -// CHECK:STDOUT: %InaccessibleConversion.cpp_operator.bound: = bound_method %s.ref, imports.%InaccessibleConversion.cpp_operator.decl // CHECK:STDOUT: %.loc30_21.1: ref %Dest = temporary_storage // CHECK:STDOUT: %addr: %ptr.ca8 = addr_of %.loc30_21.1 // CHECK:STDOUT: %Dest__carbon_thunk.call: init %empty_tuple.type = call imports.%Dest__carbon_thunk.decl(%s.ref, %addr) diff --git a/toolchain/check/testdata/interop/cpp/operators/operators.carbon b/toolchain/check/testdata/interop/cpp/operators/operators.carbon index 48d4251f702f..734f57a812ab 100644 --- a/toolchain/check/testdata/interop/cpp/operators/operators.carbon +++ b/toolchain/check/testdata/interop/cpp/operators/operators.carbon @@ -1869,7 +1869,6 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: %c1.ref.loc48: ref %C = name_ref c1, %c1 // CHECK:STDOUT: %int_42: Core.IntLiteral = int_value 42 [concrete = constants.%int_42.20e] -// CHECK:STDOUT: %C.cpp_operator.bound: = bound_method %c1.ref.loc48, imports.%C.cpp_operator.decl // CHECK:STDOUT: %impl.elem0.loc48: %.1c5 = impl_witness_access constants.%ImplicitAs.impl_witness.a23, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.e39] // CHECK:STDOUT: %bound_method.loc48_30.1: = bound_method %int_42, %impl.elem0.loc48 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.bf3] // CHECK:STDOUT: %specific_fn.loc48: = specific_function %impl.elem0.loc48, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] @@ -1877,7 +1876,7 @@ fn F() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc48: init %i32 = call %bound_method.loc48_30.2(%int_42) [concrete = constants.%int_42.ac4] // CHECK:STDOUT: %.loc48_30.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc48 [concrete = constants.%int_42.ac4] // CHECK:STDOUT: %.loc48_30.2: %i32 = converted %int_42, %.loc48_30.1 [concrete = constants.%int_42.ac4] -// CHECK:STDOUT: %C.cpp_operator.call: init %i32 = call %C.cpp_operator.bound(%c1.ref.loc48, %.loc48_30.2) +// CHECK:STDOUT: %C.cpp_operator.call: init %i32 = call imports.%C.cpp_operator.decl(%c1.ref.loc48, %.loc48_30.2) // CHECK:STDOUT: %i32: type = type_literal constants.%i32 [concrete = constants.%i32] // CHECK:STDOUT: %.loc48_32.1: %i32 = value_of_initializer %C.cpp_operator.call // CHECK:STDOUT: %.loc48_32.2: %i32 = converted %C.cpp_operator.call, %.loc48_32.1 @@ -3076,12 +3075,8 @@ fn F() { // CHECK:STDOUT: %ptr.0a2: type = ptr_type %C [concrete] // CHECK:STDOUT: %C__carbon_thunk.type: type = fn_type @C__carbon_thunk [concrete] // CHECK:STDOUT: %C__carbon_thunk: %C__carbon_thunk.type = struct_value () [concrete] -// CHECK:STDOUT: %C.cpp_operator.type.c4928b.1: type = fn_type @C.cpp_operator.1 [concrete] -// CHECK:STDOUT: %C.cpp_operator.fb6eba.1: %C.cpp_operator.type.c4928b.1 = struct_value () [concrete] // CHECK:STDOUT: %operator_Minus__carbon_thunk.type: type = fn_type @operator_Minus__carbon_thunk [concrete] // CHECK:STDOUT: %operator_Minus__carbon_thunk: %operator_Minus__carbon_thunk.type = struct_value () [concrete] -// CHECK:STDOUT: %C.cpp_operator.type.c4928b.2: type = fn_type @C.cpp_operator.2 [concrete] -// CHECK:STDOUT: %C.cpp_operator.fb6eba.2: %C.cpp_operator.type.c4928b.2 = struct_value () [concrete] // CHECK:STDOUT: %operator_Plus__carbon_thunk.type: type = fn_type @operator_Plus__carbon_thunk [concrete] // CHECK:STDOUT: %operator_Plus__carbon_thunk: %operator_Plus__carbon_thunk.type = struct_value () [concrete] // CHECK:STDOUT: %C.cpp_destructor.type: type = fn_type @C.cpp_destructor [concrete] @@ -3102,21 +3097,11 @@ fn F() { // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: %C.cpp_operator.decl.25fc23.1: %C.cpp_operator.type.c4928b.1 = fn_decl @C.cpp_operator.1 [concrete = constants.%C.cpp_operator.fb6eba.1] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } // CHECK:STDOUT: %operator_Minus__carbon_thunk.decl: %operator_Minus__carbon_thunk.type = fn_decl @operator_Minus__carbon_thunk [concrete = constants.%operator_Minus__carbon_thunk] { // CHECK:STDOUT: // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: %C.cpp_operator.decl.25fc23.2: %C.cpp_operator.type.c4928b.2 = fn_decl @C.cpp_operator.2 [concrete = constants.%C.cpp_operator.fb6eba.2] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } // CHECK:STDOUT: %operator_Plus__carbon_thunk.decl: %operator_Plus__carbon_thunk.type = fn_decl @operator_Plus__carbon_thunk [concrete = constants.%operator_Plus__carbon_thunk] { // CHECK:STDOUT: // CHECK:STDOUT: } { @@ -3155,7 +3140,6 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: %c2.var: ref %C = var %c2.var_patt // CHECK:STDOUT: %c1.ref.loc9: ref %C = name_ref c1, %c1 -// CHECK:STDOUT: %C.cpp_operator.bound.loc9: = bound_method %c1.ref.loc9, imports.%C.cpp_operator.decl.25fc23.1 // CHECK:STDOUT: %.loc9_3: ref %C = splice_block %c2.var {} // CHECK:STDOUT: %addr.loc9: %ptr.0a2 = addr_of %.loc9_3 // CHECK:STDOUT: %operator_Minus__carbon_thunk.call: init %empty_tuple.type = call imports.%operator_Minus__carbon_thunk.decl(%c1.ref.loc9, %addr.loc9) @@ -3173,7 +3157,6 @@ fn F() { // CHECK:STDOUT: %c3.var: ref %C = var %c3.var_patt // CHECK:STDOUT: %c1.ref.loc10: ref %C = name_ref c1, %c1 // CHECK:STDOUT: %c2.ref: ref %C = name_ref c2, %c2 -// CHECK:STDOUT: %C.cpp_operator.bound.loc10: = bound_method %c1.ref.loc10, imports.%C.cpp_operator.decl.25fc23.2 // CHECK:STDOUT: %.loc10_3: ref %C = splice_block %c3.var {} // CHECK:STDOUT: %.loc10_31.1: %C = acquire_value %c2.ref // CHECK:STDOUT: %.loc10_31.2: ref %C = value_as_ref %.loc10_31.1 diff --git a/toolchain/check/testdata/interop/cpp/range_for.carbon b/toolchain/check/testdata/interop/cpp/range_for.carbon index 6cf45f7ebdd5..7007ad0d1b6e 100644 --- a/toolchain/check/testdata/interop/cpp/range_for.carbon +++ b/toolchain/check/testdata/interop/cpp/range_for.carbon @@ -1185,8 +1185,6 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %struct_type.value.has_value.761: type = struct_type {.value: %MaybeUnformed.02e, .has_value: bool} [concrete] // CHECK:STDOUT: %Optional.HasValue.specific_fn: = specific_function %Optional.HasValue.988, @Optional.HasValue(%OptionalStorage.facet.705) [concrete] // CHECK:STDOUT: %Optional.Get.specific_fn: = specific_function %Optional.Get.59c, @Optional.Get(%OptionalStorage.facet.705) [concrete] -// CHECK:STDOUT: %ValueType.cpp_operator.type: type = fn_type @ValueType.cpp_operator [concrete] -// CHECK:STDOUT: %ValueType.cpp_operator: %ValueType.cpp_operator.type = struct_value () [concrete] // CHECK:STDOUT: %operator_PlusEqual__carbon_thunk.type: type = fn_type @operator_PlusEqual__carbon_thunk [concrete] // CHECK:STDOUT: %operator_PlusEqual__carbon_thunk: %operator_PlusEqual__carbon_thunk.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.Op.type.1d8f74.7: type = fn_type @Destroy.Op.loc44_29.6 [concrete] @@ -1335,11 +1333,6 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %Core.import_ref.3e6: @R.as_type.as.Iterate.impl.%R.as_type.as.Iterate.impl.NewCursor.type (%R.as_type.as.Iterate.impl.NewCursor.type.36f) = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [symbolic = @R.as_type.as.Iterate.impl.%R.as_type.as.Iterate.impl.NewCursor (constants.%R.as_type.as.Iterate.impl.NewCursor.29b)] // CHECK:STDOUT: %Core.import_ref.85d: @R.as_type.as.Iterate.impl.%R.as_type.as.Iterate.impl.Next.type (%R.as_type.as.Iterate.impl.Next.type.1f7) = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [symbolic = @R.as_type.as.Iterate.impl.%R.as_type.as.Iterate.impl.Next (constants.%R.as_type.as.Iterate.impl.Next.0d6)] // CHECK:STDOUT: %Iterate.impl_witness_table.344 = impl_witness_table (%Core.import_ref.301, %Core.import_ref.89f, %Core.import_ref.3e6, %Core.import_ref.85d), @R.as_type.as.Iterate.impl [concrete] -// CHECK:STDOUT: %ValueType.cpp_operator.decl: %ValueType.cpp_operator.type = fn_decl @ValueType.cpp_operator [concrete = constants.%ValueType.cpp_operator] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } // CHECK:STDOUT: %operator_PlusEqual__carbon_thunk.decl: %operator_PlusEqual__carbon_thunk.type = fn_decl @operator_PlusEqual__carbon_thunk [concrete = constants.%operator_PlusEqual__carbon_thunk] { // CHECK:STDOUT: // CHECK:STDOUT: } { @@ -1433,7 +1426,6 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %i: %ValueType = value_binding i, %.loc44_29.14 // CHECK:STDOUT: %sum.ref: ref %ValueType = name_ref sum, %sum // CHECK:STDOUT: %i.ref: %ValueType = name_ref i, %i -// CHECK:STDOUT: %ValueType.cpp_operator.bound: = bound_method %sum.ref, imports.%ValueType.cpp_operator.decl // CHECK:STDOUT: %.loc45_12: ref %ValueType = value_as_ref %i.ref // CHECK:STDOUT: %addr.loc45: %ptr.a3d = addr_of %.loc45_12 // CHECK:STDOUT: %.loc45_9.1: %ptr.6bf = as_compatible %addr.loc45 @@ -2326,8 +2318,6 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %struct_type.value.has_value.5a1: type = struct_type {.value: %MaybeUnformed.669, .has_value: bool} [concrete] // CHECK:STDOUT: %Optional.HasValue.specific_fn: = specific_function %Optional.HasValue.605, @Optional.HasValue(%OptionalStorage.facet.7ce) [concrete] // CHECK:STDOUT: %Optional.Get.specific_fn: = specific_function %Optional.Get.5aa, @Optional.Get(%OptionalStorage.facet.7ce) [concrete] -// CHECK:STDOUT: %ValueType.cpp_operator.type: type = fn_type @ValueType.cpp_operator [concrete] -// CHECK:STDOUT: %ValueType.cpp_operator: %ValueType.cpp_operator.type = struct_value () [concrete] // CHECK:STDOUT: %operator_PlusEqual__carbon_thunk.type: type = fn_type @operator_PlusEqual__carbon_thunk [concrete] // CHECK:STDOUT: %operator_PlusEqual__carbon_thunk: %operator_PlusEqual__carbon_thunk.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.Op.type.1d8f74.7: type = fn_type @Destroy.Op.loc31_31.6 [concrete] @@ -2424,11 +2414,6 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %Core.import_ref.3e6: @R.as_type.as.Iterate.impl.%R.as_type.as.Iterate.impl.NewCursor.type (%R.as_type.as.Iterate.impl.NewCursor.type.36f) = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [symbolic = @R.as_type.as.Iterate.impl.%R.as_type.as.Iterate.impl.NewCursor (constants.%R.as_type.as.Iterate.impl.NewCursor.29b)] // CHECK:STDOUT: %Core.import_ref.85d: @R.as_type.as.Iterate.impl.%R.as_type.as.Iterate.impl.Next.type (%R.as_type.as.Iterate.impl.Next.type.1f7) = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [symbolic = @R.as_type.as.Iterate.impl.%R.as_type.as.Iterate.impl.Next (constants.%R.as_type.as.Iterate.impl.Next.0d6)] // CHECK:STDOUT: %Iterate.impl_witness_table.344 = impl_witness_table (%Core.import_ref.301, %Core.import_ref.89f, %Core.import_ref.3e6, %Core.import_ref.85d), @R.as_type.as.Iterate.impl [concrete] -// CHECK:STDOUT: %ValueType.cpp_operator.decl: %ValueType.cpp_operator.type = fn_decl @ValueType.cpp_operator [concrete = constants.%ValueType.cpp_operator] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } // CHECK:STDOUT: %operator_PlusEqual__carbon_thunk.decl: %operator_PlusEqual__carbon_thunk.type = fn_decl @operator_PlusEqual__carbon_thunk [concrete = constants.%operator_PlusEqual__carbon_thunk] { // CHECK:STDOUT: // CHECK:STDOUT: } { @@ -2520,7 +2505,6 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %i: %ValueType = value_binding i, %.loc31_31.14 // CHECK:STDOUT: %sum.ref: ref %ValueType = name_ref sum, %sum // CHECK:STDOUT: %i.ref: %ValueType = name_ref i, %i -// CHECK:STDOUT: %ValueType.cpp_operator.bound: = bound_method %sum.ref, imports.%ValueType.cpp_operator.decl // CHECK:STDOUT: %.loc32_12: ref %ValueType = value_as_ref %i.ref // CHECK:STDOUT: %addr.loc32: %ptr.9d3 = addr_of %.loc32_12 // CHECK:STDOUT: %.loc32_9.1: %ptr.32e = as_compatible %addr.loc32 @@ -2673,8 +2657,6 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %struct_type.value.has_value.5a1: type = struct_type {.value: %MaybeUnformed.669, .has_value: bool} [concrete] // CHECK:STDOUT: %Optional.HasValue.specific_fn: = specific_function %Optional.HasValue.cdf, @Optional.HasValue(%OptionalStorage.facet.642) [concrete] // CHECK:STDOUT: %Optional.Get.specific_fn: = specific_function %Optional.Get.6bf, @Optional.Get(%OptionalStorage.facet.642) [concrete] -// CHECK:STDOUT: %ValueType.cpp_operator.type: type = fn_type @ValueType.cpp_operator [concrete] -// CHECK:STDOUT: %ValueType.cpp_operator: %ValueType.cpp_operator.type = struct_value () [concrete] // CHECK:STDOUT: %operator_PlusEqual__carbon_thunk.type: type = fn_type @operator_PlusEqual__carbon_thunk [concrete] // CHECK:STDOUT: %operator_PlusEqual__carbon_thunk: %operator_PlusEqual__carbon_thunk.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.Op.type.1d8f74.7: type = fn_type @Destroy.Op.loc32_31.6 [concrete] @@ -2712,11 +2694,6 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: %ValueType.cpp_operator.decl: %ValueType.cpp_operator.type = fn_decl @ValueType.cpp_operator [concrete = constants.%ValueType.cpp_operator] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } // CHECK:STDOUT: %operator_PlusEqual__carbon_thunk.decl: %operator_PlusEqual__carbon_thunk.type = fn_decl @operator_PlusEqual__carbon_thunk [concrete = constants.%operator_PlusEqual__carbon_thunk] { // CHECK:STDOUT: // CHECK:STDOUT: } { @@ -2808,7 +2785,6 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %i: %ValueType = value_binding i, %.loc32_31.14 // CHECK:STDOUT: %sum.ref: ref %ValueType = name_ref sum, %sum // CHECK:STDOUT: %i.ref: %ValueType = name_ref i, %i -// CHECK:STDOUT: %ValueType.cpp_operator.bound: = bound_method %sum.ref, imports.%ValueType.cpp_operator.decl // CHECK:STDOUT: %.loc33_12: ref %ValueType = value_as_ref %i.ref // CHECK:STDOUT: %addr.loc33: %ptr.9d3 = addr_of %.loc33_12 // CHECK:STDOUT: %.loc33_9.1: %ptr.32e = as_compatible %addr.loc33 @@ -2963,8 +2939,6 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %struct_type.value.has_value.5a1: type = struct_type {.value: %MaybeUnformed.669, .has_value: bool} [concrete] // CHECK:STDOUT: %Optional.HasValue.specific_fn: = specific_function %Optional.HasValue.605, @Optional.HasValue(%OptionalStorage.facet.7ce) [concrete] // CHECK:STDOUT: %Optional.Get.specific_fn: = specific_function %Optional.Get.5aa, @Optional.Get(%OptionalStorage.facet.7ce) [concrete] -// CHECK:STDOUT: %ValueType.cpp_operator.type: type = fn_type @ValueType.cpp_operator [concrete] -// CHECK:STDOUT: %ValueType.cpp_operator: %ValueType.cpp_operator.type = struct_value () [concrete] // CHECK:STDOUT: %operator_PlusEqual__carbon_thunk.type: type = fn_type @operator_PlusEqual__carbon_thunk [concrete] // CHECK:STDOUT: %operator_PlusEqual__carbon_thunk: %operator_PlusEqual__carbon_thunk.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.Op.type.1d8f74.7: type = fn_type @Destroy.Op.loc39_31.6 [concrete] @@ -3054,11 +3028,6 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %Core.import_ref.3e6: @R.as_type.as.Iterate.impl.%R.as_type.as.Iterate.impl.NewCursor.type (%R.as_type.as.Iterate.impl.NewCursor.type.36f) = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [symbolic = @R.as_type.as.Iterate.impl.%R.as_type.as.Iterate.impl.NewCursor (constants.%R.as_type.as.Iterate.impl.NewCursor.29b)] // CHECK:STDOUT: %Core.import_ref.85d: @R.as_type.as.Iterate.impl.%R.as_type.as.Iterate.impl.Next.type (%R.as_type.as.Iterate.impl.Next.type.1f7) = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [symbolic = @R.as_type.as.Iterate.impl.%R.as_type.as.Iterate.impl.Next (constants.%R.as_type.as.Iterate.impl.Next.0d6)] // CHECK:STDOUT: %Iterate.impl_witness_table.344 = impl_witness_table (%Core.import_ref.301, %Core.import_ref.89f, %Core.import_ref.3e6, %Core.import_ref.85d), @R.as_type.as.Iterate.impl [concrete] -// CHECK:STDOUT: %ValueType.cpp_operator.decl: %ValueType.cpp_operator.type = fn_decl @ValueType.cpp_operator [concrete = constants.%ValueType.cpp_operator] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } // CHECK:STDOUT: %operator_PlusEqual__carbon_thunk.decl: %operator_PlusEqual__carbon_thunk.type = fn_decl @operator_PlusEqual__carbon_thunk [concrete = constants.%operator_PlusEqual__carbon_thunk] { // CHECK:STDOUT: // CHECK:STDOUT: } { @@ -3150,7 +3119,6 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %i: %ValueType = value_binding i, %.loc39_31.14 // CHECK:STDOUT: %sum.ref: ref %ValueType = name_ref sum, %sum // CHECK:STDOUT: %i.ref: %ValueType = name_ref i, %i -// CHECK:STDOUT: %ValueType.cpp_operator.bound: = bound_method %sum.ref, imports.%ValueType.cpp_operator.decl // CHECK:STDOUT: %.loc40_12: ref %ValueType = value_as_ref %i.ref // CHECK:STDOUT: %addr.loc40: %ptr.9d3 = addr_of %.loc40_12 // CHECK:STDOUT: %.loc40_9.1: %ptr.32e = as_compatible %addr.loc40