Skip to content

Commit 472da9e

Browse files
authored
Merge pull request #16156 from compnerd/uxfail
2 parents 387ef8f + 88003cf commit 472da9e

38 files changed

+55
-93
lines changed

test/ClangImporter/macros.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -verify %s
2-
3-
// XFAIL: linux
1+
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -enable-objc-interop -typecheck -verify %s
42

53
@_exported import macros
64

test/ClangImporter/serialization-search-paths.swift

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
// RUN: %empty-directory(%t)
2-
// RUN: %target-swift-frontend -emit-module-path %t/SerializationHelper.swiftmodule -I %S/Inputs/custom-modules -F %S/Inputs/frameworks -sdk "" -disable-objc-attr-requires-foundation-module %S/Inputs/SerializationHelper.swift
3-
// RUN: %target-swift-frontend -typecheck -I %t %s -sdk "" -verify
4-
5-
// XFAIL: linux
2+
// RUN: %target-swift-frontend -emit-module-path %t/SerializationHelper.swiftmodule -I %S/Inputs/custom-modules -F %S/Inputs/frameworks -sdk "" -enable-objc-interop -disable-objc-attr-requires-foundation-module %S/Inputs/SerializationHelper.swift
3+
// RUN: %target-swift-frontend -enable-objc-interop -typecheck -I %t %s -sdk "" -verify
64

75
import SerializationHelper
86
import Module

test/ClangImporter/serialization.swift

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
// RUN: %empty-directory(%t)
2-
// RUN: %target-swift-frontend -emit-module-path %t/SerializationHelper.swiftmodule -I %S/Inputs/custom-modules %S/Inputs/SerializationHelper.swift -sdk "" -disable-objc-attr-requires-foundation-module
3-
// RUN: %target-swift-frontend -typecheck -sdk "" -I %t -I %S/Inputs/custom-modules %s -verify
4-
5-
// XFAIL: linux
2+
// RUN: %target-swift-frontend -emit-module-path %t/SerializationHelper.swiftmodule -I %S/Inputs/custom-modules %S/Inputs/SerializationHelper.swift -sdk "" -enable-objc-interop -disable-objc-attr-requires-foundation-module
3+
// RUN: %target-swift-frontend -enable-objc-interop -typecheck -sdk "" -I %t -I %S/Inputs/custom-modules %s -verify
64

75
import SerializationHelper
86

test/ClangImporter/submodules_indirect.swift

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
// RUN: %empty-directory(%t)
2-
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -verify -I %S/Inputs/custom-modules/ %s
3-
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -o %t -emit-module -I %S/Inputs/custom-modules/ %s -module-name submodules
4-
// RUN: echo 'import submodules; let s = "\(x), \(y)"' | %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck - -I %t -I %S/Inputs/custom-modules/
5-
// RUN: echo 'import submodules; let s = "\(x), \(y)"' | not %target-swift-frontend -typecheck - -I %t -I %S/Inputs/custom-modules/ 2>&1 | %FileCheck -check-prefix=MISSING %s
6-
7-
// XFAIL: linux
2+
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -enable-objc-interop -typecheck -verify -I %S/Inputs/custom-modules/ %s
3+
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -enable-objc-interop -o %t -emit-module -I %S/Inputs/custom-modules/ %s -module-name submodules
4+
// RUN: echo 'import submodules; let s = "\(x), \(y)"' | %target-swift-frontend(mock-sdk: %clang-importer-sdk) -enable-objc-interop -typecheck - -I %t -I %S/Inputs/custom-modules/
5+
// RUN: echo 'import submodules; let s = "\(x), \(y)"' | not %target-swift-frontend -enable-objc-interop -typecheck - -I %t -I %S/Inputs/custom-modules/ 2>&1 | %FileCheck -check-prefix=MISSING %s
86

97
import ctypes_bits_exported
108
// MISSING: could not build Objective-C module 'ctypes_bits_exported'

test/IRGen/autorelease.sil

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) %s -emit-ir | %FileCheck -check-prefix=%target-cpu %s
2-
// REQUIRES: objc_interop
32

43
// rdar://16565958
54

test/IRGen/builtin_math.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir -O %s | %FileCheck %s -check-prefix CHECK-%target-os
1+
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir -O %s | %FileCheck %s -check-prefix CHECK -check-prefix CHECK-%target-os
22

33
#if os(iOS) || os(macOS) || os(tvOS) || os(watchOS)
44
import Darwin

test/IRGen/c_functions.swift

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// RUN: %empty-directory(%t)
2-
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -import-objc-header %S/Inputs/c_functions.h -primary-file %s -emit-ir | %FileCheck %s
3-
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -import-objc-header %S/Inputs/c_functions.h -primary-file %s -emit-ir | %FileCheck %s --check-prefix=%target-cpu
2+
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -import-objc-header %S/Inputs/c_functions.h -primary-file %s -emit-ir | %FileCheck %s -check-prefix CHECK -check-prefix %target-cpu
43

54
// This is deliberately not a SIL test so that we can test SILGen too.
65

@@ -19,14 +18,13 @@ func test_indirect_by_val_alignment() {
1918
log_a_thing(x)
2019
}
2120

21+
// We only want to test x86_64.
2222
// x86_64-LABEL: define hidden swiftcc void @"$S11c_functions30test_indirect_by_val_alignmentyyF"()
2323
// x86_64: %indirect-temporary = alloca %TSo7a_thinga, align [[ALIGN:[0-9]+]]
2424
// x86_64: [[CAST:%.*]] = bitcast %TSo7a_thinga* %indirect-temporary to %struct.a_thing*
2525
// x86_64: call void @log_a_thing(%struct.a_thing* byval align [[ALIGN]] [[CAST]])
2626
// x86_64: define internal void @log_a_thing(%struct.a_thing* byval align [[ALIGN]]
2727

28-
29-
// We only want to test x86_64.
3028
// aarch64: define hidden swiftcc void @"$S11c_functions30test_indirect_by_val_alignmentyyF"()
3129
// arm64: define hidden swiftcc void @"$S11c_functions30test_indirect_by_val_alignmentyyF"()
3230
// armv7k: define hidden swiftcc void @"$S11c_functions30test_indirect_by_val_alignmentyyF"()

test/IRGen/cf.sil

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %{python} %utils/chex.py < %s > %t/cf.sil
3-
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -sdk %S/Inputs %t/cf.sil -emit-ir -import-cf-types | %FileCheck --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize %t/cf.sil -DINT=i%target-ptrsize
3+
// RUN: %target-swift-frontend -enable-objc-interop -assume-parsing-unqualified-ownership-sil -sdk %S/Inputs %t/cf.sil -emit-ir -import-cf-types | %FileCheck --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize %t/cf.sil -DINT=i%target-ptrsize
44

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

87
// CHECK: [[TYPE:%swift.type]] = type
98
// CHECK: [[REFRIGERATOR:%TSo17CCRefrigeratorRefa]] = type

test/IRGen/cf_members.sil

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir -verify -I %S/../IDE/Inputs/custom-modules %s
2-
// REQUIRES: objc_interop
32

43
sil_stage canonical
54

test/IRGen/class.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-
// REQUIRES: objc_interop
54

65
import Builtin
76
import Swift

test/IRGen/class_resilience_objc.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-ir -o - -primary-file %s | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize
1+
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -enable-objc-interop -emit-ir -o - -primary-file %s | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize
22

3-
// REQUIRES: objc_interop
43
// XFAIL: CPU=armv7k
54

65
// CHECK: %swift.type = type { [[INT:i32|i64]] }

test/IRGen/class_resilience_objc_armv7k.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-ir -o - -primary-file %s | %FileCheck %s --check-prefix=CHECK
22

3-
// REQUIRES: objc_interop
43
// REQUIRES: CPU=armv7k
54

65
// CHECK: %swift.type = type { [[INT:i32|i64]] }

test/IRGen/deallocate.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir %s | %FileCheck %s
22

33
// REQUIRES: CPU=x86_64
4-
// REQUIRES: objc_interop
54

65
// rdar://16979846
76

test/IRGen/deserialize-clang-importer-witness-tables.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ public func foo(line: String) {
1313
// CHECK-LABEL: define {{.*}} void @"$SSo26NSRegularExpressionOptionsVs10SetAlgebraSCsACPxycfCTW"
1414
let versionRegex = try! RegEx(pattern: "Apple")
1515
_ = versionRegex.firstMatch(in: line)
16-
}
16+
}

test/IRGen/dynamic_lookup.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=i386 || CPU=x86_64
4-
// REQUIRES: objc_interop
54

65
import Swift
76
import Builtin

test/IRGen/enum_value_semantics_special_cases_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 %s -emit-ir | %FileCheck %s
1+
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil %s -enable-objc-interop -emit-ir | %FileCheck %s
22

33
// REQUIRES: CPU=x86_64
4-
// REQUIRES: objc_interop
54

65
import Builtin
76

test/IRGen/generic_class_anyobject.swift

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 -primary-file %s -emit-ir | %FileCheck %s
1+
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -primary-file %s -enable-objc-interop -emit-ir | %FileCheck %s
22

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

65
func foo<T: AnyObject>(_ x: T) -> T { return x }
76

test/IRGen/ivar_destroyer.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-
// REQUIRES: objc_interop
54

65
// CHECK: [[OBJCCLASS:%objc_class]] = type
76
// CHECK: [[OPAQUE:%swift.opaque]] = type opaque

test/IRGen/nested_imported_type_context_descriptor.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// RUN: %target-swift-frontend -emit-ir %s -import-objc-header %S/Inputs/nested_imported_type_context_descriptor.h | %FileCheck %s
2-
// REQUIRES: objc_interop
32

43
// Nominal type descriptors for the imported type X and both of its nested
54
// anonymous struct should get emitted as ODR.

test/IRGen/objc_block.sil

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil %s -emit-ir | %FileCheck %s
22

3-
// REQUIRES: objc_interop
4-
53
sil_stage canonical
64

75
import Swift

test/IRGen/objc_block_storage.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 -gnone -sdk %S/Inputs %s -emit-ir | %FileCheck %s
1+
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -gnone -enable-objc-interop -sdk %S/Inputs %s -emit-ir | %FileCheck %s
22

33
// REQUIRES: CPU=x86_64
4-
// REQUIRES: objc_interop
54

65
sil_stage canonical
76

test/IRGen/objc_bridged_generic_conformance.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-ir -primary-file %s -import-objc-header %S/Inputs/objc_bridged_generic_conformance.h | %FileCheck %s
2-
// REQUIRES: objc_interop
1+
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-ir -primary-file %s -enable-objc-interop -import-objc-header %S/Inputs/objc_bridged_generic_conformance.h | %FileCheck %s
32

43
// CHECK-NOT: _TMnCSo
54

test/IRGen/objc_class_empty_fields.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -primary-file %s -emit-ir | %FileCheck %s --check-prefix=CHECK-%target-ptrsize
2-
3-
// REQUIRES: objc_interop
1+
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -primary-file %s -enable-objc-interop -emit-ir | %FileCheck %s --check-prefix=CHECK-%target-ptrsize
42

53
// SR-1055
64

test/IRGen/objc_class_in_storage_decls.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
// RUN: %target-swift-frontend -emit-ir -disable-objc-attr-requires-foundation-module %s | %FileCheck %s
2-
3-
// REQUIRES: objc_interop
1+
// RUN: %target-swift-frontend -emit-ir -enable-objc-interop -disable-objc-attr-requires-foundation-module %s | %FileCheck %s
42

53
struct WrapperStruct {
64
subscript() -> Void {

test/IRGen/objc_class_property.swift

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 %s -emit-ir -disable-objc-attr-requires-foundation-module | %FileCheck %s
1+
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil %s -emit-ir -enable-objc-interop -disable-objc-attr-requires-foundation-module | %FileCheck %s
22

33
// REQUIRES: CPU=x86_64
4-
// REQUIRES: objc_interop
54

65
// Class properties get reflected to ObjC as class methods. ObjC does not have
76
// class properties, so no ObjC property is reflected.

test/IRGen/objc_generic_protocol_conformance.swift

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-silgen -primary-file %s -import-objc-header %S/Inputs/objc_generic_protocol_conformance.h | %FileCheck --check-prefix=SIL %s
2-
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-ir -primary-file %s -import-objc-header %S/Inputs/objc_generic_protocol_conformance.h | %FileCheck --check-prefix=IR %s
3-
4-
// REQUIRES: objc_interop
1+
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-silgen -primary-file %s -enable-objc-interop -import-objc-header %S/Inputs/objc_generic_protocol_conformance.h | %FileCheck --check-prefix=SIL %s
2+
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-ir -primary-file %s -enable-objc-interop -import-objc-header %S/Inputs/objc_generic_protocol_conformance.h | %FileCheck --check-prefix=IR %s
53

64
protocol P {
75
func foo()

test/IRGen/objc_protocol_multi_file.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -primary-file %s %S/Inputs/objc_protocol_multi_file_helper.swift -g -emit-ir | %FileCheck %s
22

3-
// REQUIRES: objc_interop
4-
53
// This used to crash <rdar://problem/17929944>.
64
// To tickle the crash, SubProto must not be used elsewhere in this file.
75
protocol SubProto : BaseProto {}

test/IRGen/objc_runtime_visible.sil

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
// REQUIRES: objc_interop
2-
3-
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -I %S/../Inputs/custom-modules %s -emit-ir | %FileCheck %s
1+
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -enable-objc-interop -I %S/../Inputs/custom-modules %s -emit-ir | %FileCheck %s
42

53
sil_stage raw
64

@@ -11,7 +9,7 @@ import ObjCRuntimeVisible
119

1210
// CHECK: [[CLASS_NAME:@.*]] = private unnamed_addr constant [22 x i8] c"MyRuntimeVisibleClass\00"
1311

14-
// CHECK: define swiftcc %objc_class* @getClassA() #0 {
12+
// CHECK: define {{(protected )?}}swiftcc %objc_class* @getClassA() #0 {
1513
sil @getClassA : $@convention(thin) () -> @objc_metatype A.Type {
1614
bb0:
1715
// CHECK: call %objc_class* @objc_lookUpClass(i8* getelementptr inbounds ([22 x i8], [22 x i8]* [[CLASS_NAME]],
@@ -21,7 +19,7 @@ bb0:
2119
return %0 : $@objc_metatype A.Type
2220
}
2321

24-
// CHECK: define swiftcc void @deallocA(%TSo1AC*) #0 {
22+
// CHECK: define {{(protected )?}}swiftcc void @deallocA(%TSo1AC*) #0 {
2523
sil @deallocA : $@convention(thin) (@owned A) -> () {
2624
bb0(%0 : $A):
2725
%1 = metatype $@thick A.Type

test/IRGen/objc_runtime_visible_conformance.swift

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
// REQUIRES: objc_interop
2-
3-
// RUN: %target-swift-frontend -I %S/../Inputs/custom-modules %s -emit-ir | %FileCheck %s
1+
// RUN: %target-swift-frontend -enable-objc-interop -I %S/../Inputs/custom-modules %s -emit-ir | %FileCheck %s
42

53
import ObjCRuntimeVisible
64

@@ -10,7 +8,7 @@ protocol YourProtocol {}
108
extension A : MyProtocol {}
119
extension A : YourProtocol {}
1210

13-
// CHECK-LABEL: @"$SSo1ACMn" = linkonce_odr hidden constant <{ {{.*}} }>, section "__TEXT,__const"
11+
// CHECK-LABEL: @"$SSo1ACMn" = linkonce_odr hidden constant <{ {{.*}} }>
1412

1513
// CHECK-LABEL: define linkonce_odr hidden swiftcc %swift.metadata_response @"$SSo1ACMa"({{i32|i64}}) {{.*}} {
1614
// CHECK: call %objc_class* @objc_lookUpClass

test/IRGen/objc_selector.sil

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1-
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir %s | %FileCheck %s
2-
3-
// REQUIRES: objc_interop
1+
// RUN: %target-swift-frontend -enable-objc-interop -assume-parsing-unqualified-ownership-sil -emit-ir %s | %FileCheck %s
42

53
sil_stage canonical
64

75
import Builtin
86

9-
// CHECK: @"\01L_selector_data(help:me:)" = private global [9 x i8] c"help:me:\00", section "__TEXT,__objc_methname,cstring_literals"
10-
// CHECK: @"\01L_selector(help:me:)" = private externally_initialized global i8* getelementptr inbounds ([9 x i8], [9 x i8]* @"\01L_selector_data(help:me:)", {{i(32|64)}} 0, {{i(32|64)}} 0), section "__DATA,__objc_selrefs,literal_pointers,no_dead_strip"
7+
// CHECK: @"\01L_selector_data(help:me:)" = private global [9 x i8] c"help:me:\00"
8+
// CHECK: @"\01L_selector(help:me:)" = private externally_initialized global i8* getelementptr inbounds ([9 x i8], [9 x i8]* @"\01L_selector_data(help:me:)", {{i(32|64)}} 0, {{i(32|64)}} 0)
119

1210
// CHECK-LABEL: define{{( dllexport)?}}{{( protected)?}} swiftcc i8* @objc_selector_literal() #0 {
1311
sil @objc_selector_literal : $@convention(thin) () -> Builtin.RawPointer {

test/IRGen/objc_subscripts.swift

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 -primary-file %s -emit-ir -disable-objc-attr-requires-foundation-module | %FileCheck %s
1+
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -primary-file %s -emit-ir -enable-objc-interop -disable-objc-attr-requires-foundation-module | %FileCheck %s
22

33
// REQUIRES: CPU=x86_64
4-
// REQUIRES: objc_interop
54

65
// CHECK: @_INSTANCE_METHODS__TtC15objc_subscripts10SomeObject =
76
// CHECK: private constant { i32, i32, [5 x { i8*, i8*, i8* }] }
@@ -34,7 +33,7 @@
3433
// CHECK: { i8*, i8*, i8* }
3534
// CHECK: { i8* getelementptr inbounds ([5 x i8], [5 x i8]* @"\01L_selector_data(init)", i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @{{[0-9]+}}, i64 0, i64 0), i8* bitcast ([[OPAQUE8:%.*]]* ([[OPAQUE9:%.*]]*, i8*)* @"$S15objc_subscripts10SomeObjectCACycfcTo" to i8*) }
3635
// CHECK: ]
37-
// CHECK: }, section "__DATA, __objc_const", align 8
36+
// CHECK: }
3837

3938
@objc class SomeObject {
4039
subscript (i : Int) -> SomeObject {

test/IRGen/protocol_metadata.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -primary-file %s -emit-ir -disable-objc-attr-requires-foundation-module | %FileCheck %s
22

33
// REQUIRES: CPU=x86_64
4-
// REQUIRES: objc_interop
54

65
protocol A { func a() }
76
protocol B { func b() }

test/IRGen/sanitize_coverage.swift

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// XFAIL: linux
21
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir -sanitize=address -sanitize-coverage=func %s | %FileCheck %s -check-prefix=SANCOV
32
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir -sanitize=address -sanitize-coverage=bb %s | %FileCheck %s -check-prefix=SANCOV
43
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir -sanitize=address -sanitize-coverage=edge %s | %FileCheck %s -check-prefix=SANCOV
@@ -9,14 +8,25 @@
98
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir -sanitize=address -sanitize-coverage=edge,8bit-counters %s | %FileCheck %s -check-prefix=SANCOV -check-prefix=SANCOV_8BIT_COUNTERS
109
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir -sanitize=fuzzer %s | %FileCheck %s -check-prefix=SANCOV -check-prefix=SANCOV_TRACE_CMP
1110

11+
#if os(iOS) || os(macOS) || os(tvOS) || os(watchOS)
1212
import Darwin
13+
#elseif os(Android) || os(Cygwin) || os(FreeBSD) || os(Linux)
14+
import Glibc
15+
#elseif os(Windows)
16+
import MSVCRT
17+
#endif
1318

1419
// FIXME: We should have a reliable way of triggering an indirect call in the
1520
// LLVM IR generated from this code.
1621
func test() {
1722
// Use random numbers so the compiler can't constant fold
23+
#if os(iOS) || os(macOS) || os(tvOS) || os(watchOS)
1824
let x = arc4random()
1925
let y = arc4random()
26+
#else
27+
let x = rand()
28+
let y = rand()
29+
#endif
2030
// Comparison is to trigger insertion of __sanitizer_cov_trace_cmp
2131
let z = x == y
2232
print("\(z)")

test/IRGen/sil_generic_witness_methods_objc.swift

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 -primary-file %s -emit-ir -disable-objc-attr-requires-foundation-module | %FileCheck %s
1+
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -primary-file %s -emit-ir -enable-objc-interop -disable-objc-attr-requires-foundation-module | %FileCheck %s
22

33
// REQUIRES: CPU=x86_64
4-
// REQUIRES: objc_interop
54

65
// FIXME: These should be SIL tests, but we can't parse generic types in SIL
76
// yet.

test/IRGen/subclass.swift

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 -primary-file %s -emit-ir | %FileCheck %s
1+
// RUN: %target-swift-frontend -enable-objc-interop -assume-parsing-unqualified-ownership-sil -primary-file %s -emit-ir | %FileCheck %s
22

33
// REQUIRES: CPU=x86_64
4-
// REQUIRES: objc_interop
54

65
// CHECK-DAG: %swift.refcounted = type {
76
// CHECK-DAG: [[TYPE:%swift.type]] = type
@@ -35,7 +34,7 @@
3534
// CHECK: i64 ([[B]]*)* @"$S8subclass1BC1fSiyF",
3635
// CHECK: [[A]]* ([[TYPE]]*)* @"$S8subclass1AC1gACyFZ"
3736
// CHECK: }>
38-
// CHECK: @objc_classes = internal global [2 x i8*] [i8* {{.*}} @"$S8subclass1ACN" {{.*}}, i8* {{.*}} @"$S8subclass1BCN" {{.*}}], section "__DATA,__objc_classlist,regular,no_dead_strip", align 8
37+
// CHECK: @objc_classes = internal global [2 x i8*] [i8* {{.*}} @"$S8subclass1ACN" {{.*}}, i8* {{.*}} @"$S8subclass1BCN" {{.*}}]
3938

4039
class A {
4140
var x = 0

0 commit comments

Comments
 (0)