Skip to content

Commit 87a520c

Browse files
committed
SwiftCompilerSources: exclude some low level file operations, which are not compilable on windows
1 parent 0c8c985 commit 87a520c

File tree

11 files changed

+35
-0
lines changed

11 files changed

+35
-0
lines changed

SwiftCompilerSources/Sources/Basic/Utils.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ public extension NoReflectionChildren {
5151
var customMirror: Mirror { Mirror(self, children: []) }
5252
}
5353

54+
#if !os(Windows)
55+
// TODO: https://github.com/apple/swift/issues/73252
56+
5457
public var standardError = CFileStream(fp: stderr)
5558

5659
#if os(Android) || canImport(Musl)
@@ -71,6 +74,8 @@ public struct CFileStream: TextOutputStream {
7174
}
7275
}
7376

77+
#endif
78+
7479
//===----------------------------------------------------------------------===//
7580
// StringRef
7681
//===----------------------------------------------------------------------===//

SwiftCompilerSources/Sources/Optimizer/FunctionPasses/LifetimeDependenceDiagnostics.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,10 @@ private struct DiagnoseDependence {
121121
}
122122

123123
func reportUnknown(operand: Operand) {
124+
#if !os(Windows)
125+
// TODO: https://github.com/apple/swift/issues/73252
124126
standardError.write("Unknown use: \(operand)\n\(function)")
127+
#endif
125128
reportEscaping(operand: operand)
126129
}
127130

SwiftCompilerSources/Sources/Optimizer/Utilities/Test.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,10 @@ private func functionTestThunk(
197197
let invocation = castToInvocation(fromOpaquePointer: erasedInvocation)
198198
let context = FunctionPassContext(_bridged: BridgedPassContext(invocation: passInvocation.invocation))
199199
invocation(function.function, arguments.native, context)
200+
#if !os(Windows)
201+
// TODO: https://github.com/apple/swift/issues/73252
200202
fflush(stdout)
203+
#endif
201204
}
202205

203206
/// Bitcast a thin test closure to void *.

test/SILOptimizer/argument_conventions.sil

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

66
// REQUIRES: swift_in_compiler
77

8+
// https://github.com/apple/swift/issues/73252
9+
// UNSUPPORTED: OS=windows-msvc
10+
811
import Builtin
912

1013
class C {}

test/SILOptimizer/borrow_introducer_unit.sil

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

5+
// https://github.com/apple/swift/issues/73252
6+
// UNSUPPORTED: OS=windows-msvc
7+
58
sil_stage raw
69

710
import Builtin

test/SILOptimizer/enclosing_def_unit.sil

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

5+
// https://github.com/apple/swift/issues/73252
6+
// UNSUPPORTED: OS=windows-msvc
7+
58
sil_stage raw
69

710
import Builtin

test/SILOptimizer/forwarding_utils.sil

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

33
// REQUIRES: swift_in_compiler
44

5+
// https://github.com/apple/swift/issues/73252
6+
// UNSUPPORTED: OS=windows-msvc
7+
58
sil_stage raw
69

710
import Builtin

test/SILOptimizer/lifetime_dependence_util.sil

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
// REQUIRES: asserts
88
// REQUIRES: swift_in_compiler
99

10+
// https://github.com/apple/swift/issues/73252
11+
// UNSUPPORTED: OS=windows-msvc
12+
1013
sil_stage canonical
1114

1215
import Builtin

test/SILOptimizer/opaque_values_unit.sil

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

33
// REQUIRES: swift_in_compiler
44

5+
// https://github.com/apple/swift/issues/73252
6+
// UNSUPPORTED: OS=windows-msvc
7+
58
import Builtin
69

710
class C {}

test/SILOptimizer/ownership_liveness_unit.sil

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

77
// REQUIRES: swift_in_compiler
88

9+
// https://github.com/apple/swift/issues/73252
10+
// UNSUPPORTED: OS=windows-msvc
11+
912
sil_stage canonical
1013

1114
import Builtin

0 commit comments

Comments
 (0)