Skip to content

Commit 894b99c

Browse files
authored
Merge pull request swiftlang#21566 from compnerd/a-new-standard
2 parents f6e4941 + 7ca074b commit 894b99c

20 files changed

+78
-28
lines changed

test/stdlib/CastTraps.swift.gyb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// FIXME: Casting.cpp has dozens of places to fail a cast. This test does not
66
// attempt to enumerate them all.
77

8-
// XFAIL: linux
8+
// REQUIRES: objc_interop
99

1010
import StdlibUnittest
1111

test/stdlib/Error.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %empty-directory(%t)
2-
// RUN: %target-build-swift -o %t/Error -DPTR_SIZE_%target-ptrsize -module-name main %s
2+
// RUN: %target-build-swift -o %t/Error -DPTR_SIZE_%target-ptrsize -module-name main %/s
33
// RUN: %target-run %t/Error
44
// REQUIRES: executable_test
55

test/stdlib/FloatConstants.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
import Darwin
55
#elseif os(Linux) || os(FreeBSD) || os(PS4) || os(Android)
66
import Glibc
7+
#elseif os(Windows)
8+
import MSVCRT
79
#endif
810

911
_ = FLT_RADIX // expected-warning {{is deprecated}}

test/stdlib/FloatingPointIR.swift

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@
44

55
var globalFloat32 : Float32 = 0.0
66
var globalFloat64 : Float64 = 0.0
7-
#if arch(i386) || arch(x86_64)
8-
var globalFloat80 : Float80 = 0.0
9-
#endif
107

118
@inline(never)
129
func acceptFloat32(_ a: Float32) {
@@ -18,28 +15,16 @@ func acceptFloat64(_ a: Float64) {
1815
globalFloat64 = a
1916
}
2017

21-
#if arch(i386) || arch(x86_64)
22-
@inline(never)
23-
func acceptFloat80(_ a: Float80) {
24-
globalFloat80 = a
25-
}
26-
#endif
27-
2818
func testConstantFoldFloatLiterals() {
2919
acceptFloat32(1.0)
3020
acceptFloat64(1.0)
31-
#if arch(i386) || arch(x86_64)
32-
acceptFloat80(1.0)
33-
#endif
3421
}
3522

3623
// i386: call swiftcc void @"$s15FloatingPointIR13acceptFloat32yySfF{{.*}}"(float 1.000000e+00)
3724
// i386: call swiftcc void @"$s15FloatingPointIR13acceptFloat64yySdF{{.*}}"(double 1.000000e+00)
38-
// i386: call swiftcc void @"$s15FloatingPointIR13acceptFloat80yys0E0VF{{.*}}"(x86_fp80 0xK3FFF8000000000000000)
3925

4026
// x86_64: call swiftcc void @"$s15FloatingPointIR13acceptFloat32yySfF{{.*}}"(float 1.000000e+00)
4127
// x86_64: call swiftcc void @"$s15FloatingPointIR13acceptFloat64yySdF{{.*}}"(double 1.000000e+00)
42-
// x86_64: call swiftcc void @"$s15FloatingPointIR13acceptFloat80yys0E0VF{{.*}}"(x86_fp80 0xK3FFF8000000000000000)
4328

4429
// armv7: call swiftcc void @"$s15FloatingPointIR13acceptFloat32yySfF{{.*}}"(float 1.000000e+00)
4530
// armv7: call swiftcc void @"$s15FloatingPointIR13acceptFloat64yySdF{{.*}}"(double 1.000000e+00)
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// RUN: %target-build-swift -emit-ir %s | %FileCheck -check-prefix=%target-cpu %s
2+
// RUN: %target-build-swift -O -emit-ir %s | %FileCheck -check-prefix=%target-cpu %s
3+
// RUN: %target-build-swift -Ounchecked -emit-ir %s | %FileCheck -check-prefix=%target-cpu %s
4+
5+
// REQUIRES: CPU=i386 || CPU=x86_64
6+
// UNSUPPORTED: OS=windows-msvc
7+
8+
var globalFloat80 : Float80 = 0.0
9+
10+
@inline(never)
11+
func acceptFloat80(_ a: Float80) {
12+
globalFloat80 = a
13+
}
14+
15+
func testConstantFoldFloatLiterals() {
16+
acceptFloat80(1.0)
17+
}
18+
19+
// i386: call swiftcc void @"$s20FloatingPointIR_FP8013acceptFloat80yys0F0VF{{.*}}"(x86_fp80 0xK3FFF8000000000000000)
20+
// x86_64: call swiftcc void @"$s20FloatingPointIR_FP8013acceptFloat80yys0F0VF{{.*}}"(x86_fp80 0xK3FFF8000000000000000)

test/stdlib/MathConstants.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
import Darwin
55
#elseif os(Linux) || os(FreeBSD) || os(PS4) || os(Android)
66
import Glibc
7+
#elseif os(Windows)
8+
import MSVCRT
79
#endif
810

911
_ = M_PI // expected-warning {{is deprecated}}

test/stdlib/Mirror.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@
2121
// RUN: fi
2222
// RUN: %target-codesign %t/Mirror
2323
// RUN: %target-run %t/Mirror
24+
2425
// REQUIRES: executable_test
26+
// REQUIRES: shell
2527

2628
import StdlibUnittest
2729

test/stdlib/Nil.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// REQUIRES: executable_test
33

44
// FIXME: rdar://problem/19648117 Needs splitting objc parts out
5-
// XFAIL: linux
5+
// REQUIRES: objc_interop
66

77
import Foundation
88

test/stdlib/NumericParsing.swift.gyb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ tests.test("FixedWidthInteger/maxUInt64") {
134134
% for Self in 'Float', 'Double', 'Float80':
135135

136136
% if Self == 'Float80':
137-
#if arch(i386) || arch(x86_64)
137+
#if !os(Windows) && (arch(i386) || arch(x86_64))
138138
% end
139139

140140
tests.test("${Self}/Basics") {

test/stdlib/POSIX.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// RUN: %target-run-simple-swift %t
22
// REQUIRES: executable_test
3+
// UNSUPPORTED: OS=windows-msvc
34

45
import StdlibUnittest
56
#if os(Linux) || os(Android)

0 commit comments

Comments
 (0)