Skip to content

Commit b440c4f

Browse files
committed
[cxx-interop] Enable reference-counted types on Windows
This enables the use of reference-counted foreign reference types on Windows. As it turns out, the assertion that was failing on Windows previously was unnecessary. This also enabled many of the tests on Windows. rdar://154694125 / resolves swiftlang#82643
1 parent d8edd86 commit b440c4f

10 files changed

+1
-21
lines changed

lib/IRGen/GenMeta.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6880,7 +6880,7 @@ namespace {
68806880

68816881
void emitInitializeMetadata(IRGenFunction &IGF, llvm::Value *metadata,
68826882
MetadataDependencyCollector *collector) {
6883-
llvm_unreachable("Not implemented for foreign reference types.");
6883+
// Foreign reference types do not currently require extra metadata.
68846884
}
68856885

68866886
// Visitor methods.

test/Interop/C/struct/foreign-reference.swift

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33
//
44
// REQUIRES: executable_test
55

6-
// XFAIL: OS=windows-msvc
7-
// FIXME: Runtime support for C++ foreign reference types is missing on Windows (https://github.com/swiftlang/swift/issues/82643)
8-
96
import StdlibUnittest
107
import ForeignReference
118

test/Interop/Cxx/foreign-reference/array-of-classes.swift

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@
88
// REQUIRES: executable_test
99
// UNSUPPORTED: back_deployment_runtime
1010

11-
// Metadata for foreign reference types is not supported on Windows.
12-
// UNSUPPORTED: OS=windows-msvc
13-
1411
//--- Inputs/module.modulemap
1512

1613
module Test {

test/Interop/Cxx/foreign-reference/extensions.swift

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
// RUN: %target-run-simple-swift(-I %S/Inputs/ -Xfrontend -cxx-interoperability-mode=default -Xfrontend -disable-availability-checking -Onone) | %FileCheck %s
22
// REQUIRES: executable_test
33

4-
// Metadata for foreign reference types is not supported on Windows.
5-
// UNSUPPORTED: OS=windows-msvc
6-
74
import ReferenceCounted
85

96
protocol MyProto {

test/Interop/Cxx/foreign-reference/inheritance.swift

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
// REQUIRES: executable_test
22
// RUN: %target-run-simple-swift(-cxx-interoperability-mode=default -Xfrontend -disable-availability-checking -I %S/Inputs)
33

4-
// TODO: Fix this lit test failure on windows rdar://145218056
5-
// XFAIL: OS=windows-msvc
6-
74
import Inheritance
85
import StdlibUnittest
96

test/Interop/Cxx/foreign-reference/multiple-protocol-conformances.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
// RUN: split-file %s %t
33
// RUN: %target-build-swift -I %S/Inputs %t/main.swift %t/second.swift -cxx-interoperability-mode=default -Xfrontend -disable-availability-checking
44

5-
// XFAIL: OS=windows-msvc
6-
75
//--- main.swift
86
import ReferenceCounted
97

test/Interop/Cxx/foreign-reference/print-reference.swift

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22

33
// REQUIRES: executable_test
44

5-
// Metadata for foreign reference types is not supported on Windows.
6-
// UNSUPPORTED: OS=windows-msvc
7-
85
// Temporarily disable when running with an older runtime (rdar://153205860)
96
// UNSUPPORTED: use_os_stdlib
107
// UNSUPPORTED: back_deployment_runtime

test/Interop/Cxx/foreign-reference/reference-counted-irgen.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// RUN: %target-swift-emit-irgen %s -I %S/Inputs -cxx-interoperability-mode=default -Xcc -fignore-exceptions -disable-availability-checking | %FileCheck %s
2-
// XFAIL: OS=windows-msvc
32

43
import ReferenceCounted
54

test/Interop/Cxx/foreign-reference/reference-counted.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
// RUN: %target-run-simple-swift(-I %S/Inputs/ -Xfrontend -enable-experimental-cxx-interop -Xfrontend -validate-tbd-against-ir=none -Xfrontend -disable-llvm-verify -Xfrontend -disable-availability-checking -O)
33
//
44
// REQUIRES: executable_test
5-
// XFAIL: OS=windows-msvc
65

76
// Temporarily disable when running with an older runtime (rdar://128681137)
87
// UNSUPPORTED: use_os_stdlib

test/Interop/Cxx/foreign-reference/witness-table.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// RUN: %target-run-simple-swift(-I %S/Inputs/ -Xfrontend -enable-experimental-cxx-interop -Xfrontend -validate-tbd-against-ir=none -Xfrontend -disable-llvm-verify -g)
22
//
33
// REQUIRES: executable_test
4-
// XFAIL: OS=windows-msvc
54

65
// Temporarily disable when running with an older runtime (rdar://128681577)
76
// UNSUPPORTED: use_os_stdlib

0 commit comments

Comments
 (0)