diff --git a/test/Interop/Cxx/operators/Inputs/module.modulemap b/test/Interop/Cxx/operators/Inputs/module.modulemap index 2cc3fa14cd834..3fad5697d2a02 100644 --- a/test/Interop/Cxx/operators/Inputs/module.modulemap +++ b/test/Interop/Cxx/operators/Inputs/module.modulemap @@ -1,7 +1,3 @@ module NonMemberInline { header "non-member-inline.h" } - -module NonMemberOutOfLine { - header "non-member-out-of-line.h" -} diff --git a/test/Interop/Cxx/operators/Inputs/non-member-out-of-line.cpp b/test/Interop/Cxx/operators/Inputs/non-member-out-of-line.cpp deleted file mode 100644 index d6bccca7e7be0..0000000000000 --- a/test/Interop/Cxx/operators/Inputs/non-member-out-of-line.cpp +++ /dev/null @@ -1,5 +0,0 @@ -#include "non-member-out-of-line.h" - -IntBox operator+(IntBox lhs, IntBox rhs) { - return IntBox{.value = lhs.value + rhs.value}; -} diff --git a/test/Interop/Cxx/operators/Inputs/non-member-out-of-line.h b/test/Interop/Cxx/operators/Inputs/non-member-out-of-line.h deleted file mode 100644 index a0466d812d8c5..0000000000000 --- a/test/Interop/Cxx/operators/Inputs/non-member-out-of-line.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef TEST_INTEROP_CXX_OPERATORS_INPUTS_NON_MEMBER_OUT_OF_LINE_H -#define TEST_INTEROP_CXX_OPERATORS_INPUTS_NON_MEMBER_OUT_OF_LINE_H - -struct IntBox { - int value; -}; - -IntBox operator+(IntBox lhs, IntBox rhs); - -#endif diff --git a/test/Interop/Cxx/operators/non-member-out-of-line-irgen.swift b/test/Interop/Cxx/operators/non-member-out-of-line-irgen.swift deleted file mode 100644 index c3b3ed123837c..0000000000000 --- a/test/Interop/Cxx/operators/non-member-out-of-line-irgen.swift +++ /dev/null @@ -1,8 +0,0 @@ -// RUN: %target-swift-emit-ir %s -I %S/Inputs -enable-cxx-interop | %FileCheck %s - -import NonMemberOutOfLine - -public func add(_ lhs: IntBox, _ rhs: IntBox) -> IntBox { lhs + rhs } - -// CHECK: call i32 [[NAME:@(_Zpl6IntBoxS_|"\?\?H@YA\?AUIntBox@@U0@0@Z")]](i32 %{{[0-9]+}}, i32 %{{[0-9]+}}) -// CHECK: declare {{(dso_local )?}}i32 [[NAME]](i32, i32) diff --git a/test/Interop/Cxx/operators/non-member-out-of-line-silgen.swift b/test/Interop/Cxx/operators/non-member-out-of-line-silgen.swift deleted file mode 100644 index 302efa7cf8a1d..0000000000000 --- a/test/Interop/Cxx/operators/non-member-out-of-line-silgen.swift +++ /dev/null @@ -1,10 +0,0 @@ -// RUN: %target-swift-emit-sil %s -I %S/Inputs -enable-cxx-interop | %FileCheck %s - -import NonMemberOutOfLine - -public func add(_ lhs: IntBox, _ rhs: IntBox) -> IntBox { lhs + rhs } - -// CHECK: [[COUNTER:%.*]] = function_ref [[NAME:@(_Zpl6IntBoxS_|\?\?H@YA\?AUIntBox@@U0@0@Z)]] : $@convention(c) (IntBox, IntBox) -> IntBox -// CHECK: apply [[COUNTER]](%0, %1) : $@convention(c) (IntBox, IntBox) -> IntBox - -// CHECK: sil [serializable] [clang "+"] [[NAME]] : $@convention(c) (IntBox, IntBox) -> IntBox diff --git a/test/Interop/Cxx/operators/non-member-out-of-line.swift b/test/Interop/Cxx/operators/non-member-out-of-line.swift deleted file mode 100644 index 55a4fc8506650..0000000000000 --- a/test/Interop/Cxx/operators/non-member-out-of-line.swift +++ /dev/null @@ -1,23 +0,0 @@ -// RUN: %empty-directory(%t) -// RUN: %target-clang -c %S/Inputs/non-member-out-of-line.cpp -I %S/Inputs -o %t/non-member-out-of-line.o -std=c++17 -// RUN: %target-build-swift %s -I %S/Inputs -o %t/non-member-out-of-line %t/non-member-out-of-line.o -Xfrontend -enable-cxx-interop -// RUN: %target-codesign %t/non-member-out-of-line -// RUN: %target-run %t/non-member-out-of-line -// -// REQUIRES: executable_test - -import NonMemberOutOfLine -import StdlibUnittest - -var OperatorsTestSuite = TestSuite("Operators") - -OperatorsTestSuite.test("plus") { - let lhs = IntBox(value: 42) - let rhs = IntBox(value: 23) - - let result = lhs + rhs - - expectEqual(65, result.value) -} - -runAllTests()