Skip to content

Commit be79673

Browse files
authored
Merge pull request #16122 from compnerd/uxfail
2 parents 019b42b + dabbdad commit be79673

16 files changed

+52
-61
lines changed

test/IRGen/builtin_math.swift

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,23 @@
1-
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir -O %s | %FileCheck %s
2-
3-
// XFAIL: linux
1+
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir -O %s | %FileCheck %s -check-prefix CHECK-%target-os
42

3+
#if os(iOS) || os(macOS) || os(tvOS) || os(watchOS)
54
import Darwin
5+
#elseif os(Android) || os(Cygwin) || os(FreeBSD) || os(Linux)
6+
import Glibc
7+
#elseif os(Windows)
8+
import MSVCRT
9+
#endif
610

711
// Make sure we use an intrinsic for functions such as exp.
812

913
// CHECK-LABEL: define {{.*}}test1
10-
// CHECK: call float @llvm.exp.f32
14+
// CHECK-ios: call float @llvm.exp.f32
15+
// CHECK-macosx: call float @llvm.exp.f32
16+
// CHECK-tvos: call float @llvm.exp.f32
17+
// CHECK-watchos: call float @llvm.exp.f32
18+
// CHECK-darwin: call float @llvm.exp.f32
19+
// CHECK-linux-gnu: call float @expf
20+
// CHECK-windows: call float @expf
1121

1222
public func test1(f : Float) -> Float {
1323
return exp(f)

test/IRGen/casts.sil

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil %s -emit-ir -disable-objc-attr-requires-foundation-module | %FileCheck %s -DINT=i%target-ptrsize
1+
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil %s -emit-ir -enable-objc-interop -disable-objc-attr-requires-foundation-module | %FileCheck %s -DINT=i%target-ptrsize
22

33
// REQUIRES: CPU=i386 || CPU=x86_64
4-
// XFAIL: linux
54

65
sil_stage canonical
76

@@ -271,7 +270,7 @@ nay:
271270
unreachable
272271
}
273272

274-
// CHECK: define {{(dllexport )?}}swiftcc {{.*}} @checked_downcast_optional_class_to_ex([[INT]])
273+
// CHECK: define {{(dllexport )?}}{{(protected )?}}swiftcc {{.*}} @checked_downcast_optional_class_to_ex([[INT]])
275274
// CHECK: entry:
276275
// CHECK: [[V1:%.*]] = inttoptr [[INT]] %0 to %T5casts1AC*
277276
// CHECK: [[V2:%.*]] = icmp ne %T5casts1AC* [[V1]], null

test/IRGen/clang_inline.swift

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
// RUN: %empty-directory(%t)
2-
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -sdk %S/Inputs -primary-file %s -O -disable-sil-perf-optzns -disable-llvm-optzns -emit-ir | %FileCheck %s
2+
// RUN: %target-swift-frontend -enable-objc-interop -assume-parsing-unqualified-ownership-sil -sdk %S/Inputs -primary-file %s -O -disable-sil-perf-optzns -disable-llvm-optzns -emit-ir -Xcc -fstack-protector | %FileCheck %s
33

44
// RUN: %empty-directory(%t/Empty.framework/Modules/Empty.swiftmodule)
55
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-module-path %t/Empty.framework/Modules/Empty.swiftmodule/%target-swiftmodule-name %S/../Inputs/empty.swift -module-name Empty
6-
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -sdk %S/Inputs -primary-file %s -F %t -DIMPORT_EMPTY -O -disable-sil-perf-optzns -disable-llvm-optzns -emit-ir | %FileCheck %s
6+
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -sdk %S/Inputs -primary-file %s -F %t -DIMPORT_EMPTY -O -disable-sil-perf-optzns -disable-llvm-optzns -emit-ir -Xcc -fstack-protector -enable-objc-interop | %FileCheck %s
77

88
// REQUIRES: CPU=i386 || CPU=x86_64
9-
// XFAIL: linux
109

1110
#if IMPORT_EMPTY
1211
import Empty

test/IRGen/clang_inline_reverse.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
// Same test as clang_inline.swift, but with the order swapped.
22

3-
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -sdk %S/Inputs -primary-file %s -emit-ir -module-name clang_inline | %FileCheck %s
3+
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -sdk %S/Inputs -primary-file %s -enable-objc-interop -emit-ir -module-name clang_inline | %FileCheck %s
44

55
// REQUIRES: CPU=i386 || CPU=x86_64
6-
// XFAIL: linux
76

87
import gizmo
98

test/IRGen/class_bounded_generics.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
2-
// RUN: %target-swift-frontend -module-name class_bounded_generics -emit-ir -primary-file %s -disable-objc-attr-requires-foundation-module | %FileCheck %s -DINT=i%target-ptrsize
1+
// RUN: %target-swift-frontend -module-name class_bounded_generics -enable-objc-interop -emit-ir -primary-file %s -disable-objc-attr-requires-foundation-module | %FileCheck %s -DINT=i%target-ptrsize
32

43
// REQUIRES: CPU=x86_64
5-
// XFAIL: linux
64

75
protocol ClassBound : class {
86
func classBoundMethod()

test/IRGen/local_types.swift

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-module %S/Inputs/local_types_helper.swift -o %t
3-
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir -parse-as-library %s -I %t > %t.ll
4-
// RUN: %FileCheck %s < %t.ll
5-
// RUN: %FileCheck -check-prefix=NEGATIVE %s < %t.ll
6-
7-
// XFAIL: linux
3+
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -enable-objc-interop -emit-ir -parse-as-library %s -I %t | %FileCheck -check-prefix CHECK -check-prefix NEGATIVE %s
84

95
import local_types_helper
106

test/IRGen/metatype_casts.sil

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil %s -emit-ir | %FileCheck %s -DINT=i%target-ptrsize
1+
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil %s -enable-objc-interop -emit-ir | %FileCheck %s -DINT=i%target-ptrsize
22

33
// REQUIRES: CPU=i386 || CPU=x86_64
4-
// XFAIL: linux
4+
5+
// TODO: missing `-enable-objc-interop` results in an assertion
56

67
import Swift
78

test/IRGen/pic.swift

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,21 @@
33

44
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil %s -module-name main -S -o - | %FileCheck -check-prefix=%target-cpu %s
55

6-
// XFAIL: linux
7-
86
var global: Int = 0
97

108
public func use_global() -> Int {
119
return global
1210
}
1311

14-
// x86_64-LABEL: _$S4main10use_globalSiyF:
15-
// x86_64: movq _$S4main6globalSivp(%rip), %rax
12+
// x86_64-LABEL: {{_?}}$S4main10use_globalSiyF:
13+
// x86_64: movq {{_?}}{{[(]?}}$S4main6globalSivp{{[)]?}}(%rip), %rax
1614

17-
// i386-LABEL: _$S4main10use_globalSiyF:
15+
// i386-LABEL: {{_?}}$S4main10use_globalSiyF:
1816
// i386: [[PIC_BLOCK:^L.*\$pb]]:{{$}}
1917
// i386: popl [[PIC_REG:%[a-z]+]]
20-
// i386: movl _$S4main6globalSivp-[[PIC_BLOCK]]([[PIC_REG]]), {{%[a-z]+}}
18+
// i386: movl {{_?}}$S4main6globalSivp-[[PIC_BLOCK]]([[PIC_REG]]), {{%[a-z]+}}
2119

22-
// armv7-LABEL: _$S4main10use_globalSiyF:
20+
// armv7-LABEL: {{_?}}$S4main10use_globalSiyF:
2321
// Check for the runtime memory enforcement call. The global address may be
2422
// materialized in a different register prior to that call.
2523
// armv7: bl _swift_beginAccess
@@ -29,23 +27,23 @@ public func use_global() -> Int {
2927
// armv7: add [[R_ADR]], pc
3028
// armv7: ldr [[R_ADR]], {{\[}}[[R_ADR]]{{\]}}
3129

32-
// armv7s-LABEL: _$S4main10use_globalSiyF:
30+
// armv7s-LABEL: {{_?}}$S4main10use_globalSiyF:
3331
// armv7s: bl _swift_beginAccess
3432
// armv7s: movw [[R_ADR:r.*]], :lower16:(_$S4main6globalSivp-([[PIC_0:L.*]]+4))
3533
// armv7s: movt [[R_ADR]], :upper16:(_$S4main6globalSivp-([[PIC_0]]+4))
3634
// armv7s: [[PIC_0]]:{{$}}
3735
// armv7s: add [[R_ADR]], pc
3836
// armv7s: ldr [[R_ADR]], {{\[}}[[R_ADR]]{{\]}}
3937

40-
// armv7k-LABEL: _$S4main10use_globalSiyF:
38+
// armv7k-LABEL: {{_?}}$S4main10use_globalSiyF:
4139
// armv7k: bl _swift_beginAccess
4240
// armv7k: movw [[R_ADR:r.*]], :lower16:(_$S4main6globalSivp-([[PIC_0:L.*]]+4))
4341
// armv7k: movt [[R_ADR]], :upper16:(_$S4main6globalSivp-([[PIC_0]]+4))
4442
// armv7k: [[PIC_0]]:{{$}}
4543
// armv7k: add [[R_ADR]], pc
4644
// armv7k: ldr [[R_ADR]], {{\[}}[[R_ADR]]{{\]}}
4745

48-
// arm64-LABEL: _$S4main10use_globalSiyF:
46+
// arm64-LABEL: {{_?}}$S4main10use_globalSiyF:
4947
// arm64: bl _swift_beginAccess
5048
// arm64: adrp [[REG1:x[0-9]+]], _$S4main6globalSivp@PAGE
5149
// arm64: add [[REG2:x[0-9]+]], [[REG1]], _$S4main6globalSivp@PAGEOFF

test/IRGen/typemetadata.sil

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize
2-
// RUN: %target-swift-frontend -Osize -assume-parsing-unqualified-ownership-sil -emit-ir %s | %FileCheck %s --check-prefix=OSIZE -DINT=i%target-ptrsize
1+
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -enable-objc-interop -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize
2+
// RUN: %target-swift-frontend -Osize -assume-parsing-unqualified-ownership-sil -enable-objc-interop -emit-ir %s | %FileCheck %s --check-prefix=OSIZE -DINT=i%target-ptrsize
33

44
// REQUIRES: CPU=x86_64
5-
// XFAIL: linux
65

76
sil_stage canonical
87

test/IRGen/unowned_objc.sil

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir %s | %FileCheck %s
1+
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -enable-objc-interop -emit-ir %s | %FileCheck %s
22

33
// REQUIRES: CPU=x86_64
4-
// XFAIL: linux
54

65
import Builtin
76

test/IRGen/weak.sil

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir %s | %FileCheck %s
1+
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -enable-objc-interop -emit-ir %s | %FileCheck %s
22
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -O -S %s | %FileCheck %s --check-prefix=TAILCALL
33

44
// REQUIRES: CPU=x86_64
5-
// XFAIL: linux
65

76
// CHECK-DAG: [[TYPE:%swift.type]] = type
87
// CHECK-DAG: [[OPAQUE:%swift.opaque]] = type opaque
@@ -113,8 +112,8 @@ bb0(%0 : $Optional<P>):
113112
// CHECK-NEXT: [[T0:%.*]] = bitcast [[A]]* [[DEST]] to [[OPAQUE]]*
114113
// CHECK-NEXT: ret [[OPAQUE]]* [[T0]]
115114

116-
// TAILCALL: _$S4weak1AVwCP:
117-
// TAILCALL: jmp _swift_weakCopyInit
115+
// TAILCALL: {{_?}}$S4weak1AVwCP:
116+
// TAILCALL: jmp {{_?}}swift_weakCopyInit
118117

119118
// destroy
120119
// CHECK: define linkonce_odr hidden void @"$S4weak1AVwxx"([[OPAQUE]]* noalias [[ARG:%.*]], [[TYPE]]*
@@ -123,8 +122,8 @@ bb0(%0 : $Optional<P>):
123122
// CHECK-NEXT: call void @swift_weakDestroy([[WEAK]]* [[T1]])
124123
// CHECK-NEXT: ret void
125124

126-
// TAILCALL: _$S4weak1AVwxx:
127-
// TAILCALL: jmp _swift_weakDestroy
125+
// TAILCALL: {{_?}}$S4weak1AVwxx:
126+
// TAILCALL: jmp {{_?}}swift_weakDestroy
128127

129128
// initializeWithCopy
130129
// CHECK: define linkonce_odr hidden [[OPAQUE]]* @"$S4weak1AVwcp"([[OPAQUE]]* noalias [[DEST_OPQ:%.*]], [[OPAQUE]]* noalias [[SRC_OPQ:%.*]], [[TYPE]]*
@@ -136,8 +135,8 @@ bb0(%0 : $Optional<P>):
136135
// CHECK-NEXT: [[T0:%.*]] = bitcast [[A]]* [[DEST]] to [[OPAQUE]]*
137136
// CHECK-NEXT: ret [[OPAQUE]]* [[T0]]
138137

139-
// TAILCALL: _$S4weak1AVwcp:
140-
// TAILCALL: jmp _swift_weakCopyInit
138+
// TAILCALL: {{_?}}$S4weak1AVwcp:
139+
// TAILCALL: jmp {{_?}}swift_weakCopyInit
141140

142141
// assignWithCopy
143142
// CHECK: define linkonce_odr hidden [[OPAQUE]]* @"$S4weak1AVwca"([[OPAQUE]]* [[DEST_OPQ:%.*]], [[OPAQUE]]* [[SRC_OPQ:%.*]], [[TYPE]]*
@@ -149,8 +148,8 @@ bb0(%0 : $Optional<P>):
149148
// CHECK-NEXT: [[T0:%.*]] = bitcast [[A]]* [[DEST]] to [[OPAQUE]]*
150149
// CHECK-NEXT: ret [[OPAQUE]]* [[T0]]
151150

152-
// TAILCALL: _$S4weak1AVwca:
153-
// TAILCALL: jmp _swift_weakCopyAssign
151+
// TAILCALL: {{_?}}$S4weak1AVwca:
152+
// TAILCALL: jmp {{_?}}swift_weakCopyAssign
154153

155154
// assignWithTake
156155
// CHECK: define linkonce_odr hidden [[OPAQUE]]* @"$S4weak1AVwta"([[OPAQUE]]* noalias [[DEST_OPQ:%.*]], [[OPAQUE]]* noalias [[SRC_OPQ:%.*]], [[TYPE]]*
@@ -162,11 +161,11 @@ bb0(%0 : $Optional<P>):
162161
// CHECK-NEXT: [[T0:%.*]] = bitcast [[A]]* [[DEST]] to [[OPAQUE]]*
163162
// CHECK-NEXT: ret [[OPAQUE]]* [[T0]]
164163

165-
// TAILCALL: _$S4weak1AVwtk:
166-
// TAILCALL: jmp _swift_weakTakeInit
164+
// TAILCALL: {{_?}}$S4weak1AVwtk:
165+
// TAILCALL: jmp {{_?}}swift_weakTakeInit
167166

168-
// TAILCALL: _$S4weak1AVwta:
169-
// TAILCALL: jmp _swift_weakTakeAssign
167+
// TAILCALL: {{_?}}$S4weak1AVwta:
168+
// TAILCALL: jmp {{_?}}swift_weakTakeAssign
170169

171-
// TAILCALL: _$S4weak1AVwTK:
172-
// TAILCALL: jmp _swift_weakTakeInit
170+
// TAILCALL: {{_?}}$S4weak1AVwTK:
171+
// TAILCALL: jmp {{_?}}swift_weakTakeInit

test/Serialization/comments-framework.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
// RUN: cp -r %t/comments.framework/Modules/comments.swiftmodule %t/comments.swiftmodule
88
// RUN: %target-swift-ide-test -print-module-comments -module-to-print=comments -source-filename %s -I %t | %FileCheck %s
99

10-
// XFAIL: linux
11-
1210
/// first_decl_class_1 Aaa.
1311
public class first_decl_class_1 {
1412

test/Serialization/failed-clang-module.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
// RUN: %target-swift-frontend -typecheck %s -I %t -module-cache-path %t/mcp
1616
// RUN: %target-swift-frontend -typecheck %s -Xcc -DFAIL -I %t -module-cache-path %t/mcp -show-diagnostics-after-fatal -verify -verify-ignore-unknown
1717

18-
// XFAIL: linux
19-
2018
import SwiftModB // expected-error {{missing required module}}
2119
_ = TyB() // expected-error {{use of unresolved identifier 'TyB'}}
2220

test/Serialization/search-paths-relative.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
// RUN: %FileCheck %s < %t/has_xref.swiftmodule.txt
1313
// RUN: %FileCheck -check-prefix=NEGATIVE %s < %t/has_xref.swiftmodule.txt
1414

15-
// XFAIL: linux
16-
1715
import has_xref
1816

1917
numeric(42)

test/Serialization/search-paths.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@
2525
// RUN: %target-swift-frontend %s -emit-module -o %t/main.swiftmodule -I %t -I %t/secret -F %t/Frameworks -Fsystem %t/SystemFrameworks
2626
// RUN: llvm-bcanalyzer -dump %t/main.swiftmodule | %FileCheck %s
2727

28-
// XFAIL: linux
29-
3028
import has_xref // expected-error {{missing required modules: 'has_alias', 'struct_with_operators'}}
3129

3230
numeric(42) // expected-error {{use of unresolved identifier 'numeric'}}

test/lit.cfg

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -772,6 +772,8 @@ elif run_os in ['linux-gnu', 'linux-gnueabihf', 'freebsd', 'windows-cygnus', 'wi
772772
config.target_object_format = "elf"
773773
config.target_dylib_extension = "so"
774774
config.target_sdk_name = "linux"
775+
config.target_swiftmodule_name = run_cpu + ".swiftmodule"
776+
config.target_swiftdoc_name = run_cpu + ".swiftdoc"
775777
config.target_runtime = "native"
776778
config.target_swift_autolink_extract = inferSwiftBinary("swift-autolink-extract")
777779
config.target_build_swift = (

0 commit comments

Comments
 (0)