Skip to content

tests: enable a couple of tests on Linux, u-opt #16156

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 26, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions test/ClangImporter/macros.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -verify %s

// XFAIL: linux
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -enable-objc-interop -typecheck -verify %s

@_exported import macros

Expand Down
6 changes: 2 additions & 4 deletions test/ClangImporter/serialization-search-paths.swift
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// RUN: %empty-directory(%t)
// 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
// RUN: %target-swift-frontend -typecheck -I %t %s -sdk "" -verify

// XFAIL: linux
// 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
// RUN: %target-swift-frontend -enable-objc-interop -typecheck -I %t %s -sdk "" -verify

import SerializationHelper
import Module
Expand Down
6 changes: 2 additions & 4 deletions test/ClangImporter/serialization.swift
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// RUN: %empty-directory(%t)
// 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
// RUN: %target-swift-frontend -typecheck -sdk "" -I %t -I %S/Inputs/custom-modules %s -verify

// XFAIL: linux
// 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
// RUN: %target-swift-frontend -enable-objc-interop -typecheck -sdk "" -I %t -I %S/Inputs/custom-modules %s -verify

import SerializationHelper

Expand Down
10 changes: 4 additions & 6 deletions test/ClangImporter/submodules_indirect.swift
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
// RUN: %empty-directory(%t)
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -verify -I %S/Inputs/custom-modules/ %s
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -o %t -emit-module -I %S/Inputs/custom-modules/ %s -module-name submodules
// RUN: echo 'import submodules; let s = "\(x), \(y)"' | %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck - -I %t -I %S/Inputs/custom-modules/
// 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

// XFAIL: linux
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -enable-objc-interop -typecheck -verify -I %S/Inputs/custom-modules/ %s
// 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
// 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/
// 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

import ctypes_bits_exported
// MISSING: could not build Objective-C module 'ctypes_bits_exported'
Expand Down
1 change: 0 additions & 1 deletion test/IRGen/autorelease.sil
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) %s -emit-ir | %FileCheck -check-prefix=%target-cpu %s
// REQUIRES: objc_interop

// rdar://16565958

Expand Down
2 changes: 1 addition & 1 deletion test/IRGen/builtin_math.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir -O %s | %FileCheck %s -check-prefix CHECK-%target-os
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir -O %s | %FileCheck %s -check-prefix CHECK -check-prefix CHECK-%target-os

#if os(iOS) || os(macOS) || os(tvOS) || os(watchOS)
import Darwin
Expand Down
6 changes: 2 additions & 4 deletions test/IRGen/c_functions.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// RUN: %empty-directory(%t)
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -import-objc-header %S/Inputs/c_functions.h -primary-file %s -emit-ir | %FileCheck %s
// 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
// 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

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

Expand All @@ -19,14 +18,13 @@ func test_indirect_by_val_alignment() {
log_a_thing(x)
}

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


// We only want to test x86_64.
// aarch64: define hidden swiftcc void @"$S11c_functions30test_indirect_by_val_alignmentyyF"()
// arm64: define hidden swiftcc void @"$S11c_functions30test_indirect_by_val_alignmentyyF"()
// armv7k: define hidden swiftcc void @"$S11c_functions30test_indirect_by_val_alignmentyyF"()
Expand Down
3 changes: 1 addition & 2 deletions test/IRGen/cf.sil
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
// RUN: %empty-directory(%t)
// RUN: %{python} %utils/chex.py < %s > %t/cf.sil
// 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
// 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

// REQUIRES: CPU=i386 || CPU=x86_64
// REQUIRES: objc_interop

// CHECK: [[TYPE:%swift.type]] = type
// CHECK: [[REFRIGERATOR:%TSo17CCRefrigeratorRefa]] = type
Expand Down
1 change: 0 additions & 1 deletion test/IRGen/cf_members.sil
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir -verify -I %S/../IDE/Inputs/custom-modules %s
// REQUIRES: objc_interop

sil_stage canonical

Expand Down
3 changes: 1 addition & 2 deletions test/IRGen/class.sil
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir %s | %FileCheck %s
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -enable-objc-interop -emit-ir %s | %FileCheck %s

// REQUIRES: CPU=x86_64
// REQUIRES: objc_interop

import Builtin
import Swift
Expand Down
3 changes: 1 addition & 2 deletions test/IRGen/class_resilience_objc.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// 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
// 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

// REQUIRES: objc_interop
// XFAIL: CPU=armv7k

// CHECK: %swift.type = type { [[INT:i32|i64]] }
Expand Down
1 change: 0 additions & 1 deletion test/IRGen/class_resilience_objc_armv7k.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-ir -o - -primary-file %s | %FileCheck %s --check-prefix=CHECK

// REQUIRES: objc_interop
// REQUIRES: CPU=armv7k

// CHECK: %swift.type = type { [[INT:i32|i64]] }
Expand Down
1 change: 0 additions & 1 deletion test/IRGen/deallocate.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir %s | %FileCheck %s

// REQUIRES: CPU=x86_64
// REQUIRES: objc_interop

// rdar://16979846

Expand Down
2 changes: 1 addition & 1 deletion test/IRGen/deserialize-clang-importer-witness-tables.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ public func foo(line: String) {
// CHECK-LABEL: define {{.*}} void @"$SSo26NSRegularExpressionOptionsVs10SetAlgebraSCsACPxycfCTW"
let versionRegex = try! RegEx(pattern: "Apple")
_ = versionRegex.firstMatch(in: line)
}
}
3 changes: 1 addition & 2 deletions test/IRGen/dynamic_lookup.sil
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir %s | %FileCheck %s
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -enable-objc-interop -emit-ir %s | %FileCheck %s

// REQUIRES: CPU=i386 || CPU=x86_64
// REQUIRES: objc_interop

import Swift
import Builtin
Expand Down
3 changes: 1 addition & 2 deletions test/IRGen/enum_value_semantics_special_cases_objc.sil
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil %s -emit-ir | %FileCheck %s
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil %s -enable-objc-interop -emit-ir | %FileCheck %s

// REQUIRES: CPU=x86_64
// REQUIRES: objc_interop

import Builtin

Expand Down
3 changes: 1 addition & 2 deletions test/IRGen/generic_class_anyobject.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -primary-file %s -emit-ir | %FileCheck %s
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -primary-file %s -enable-objc-interop -emit-ir | %FileCheck %s

// REQUIRES: CPU=i386 || CPU=x86_64
// REQUIRES: objc_interop

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

Expand Down
3 changes: 1 addition & 2 deletions test/IRGen/ivar_destroyer.sil
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir %s | %FileCheck %s
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -enable-objc-interop -emit-ir %s | %FileCheck %s

// REQUIRES: CPU=x86_64
// REQUIRES: objc_interop

// CHECK: [[OBJCCLASS:%objc_class]] = type
// CHECK: [[OPAQUE:%swift.opaque]] = type opaque
Expand Down
1 change: 0 additions & 1 deletion test/IRGen/nested_imported_type_context_descriptor.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// RUN: %target-swift-frontend -emit-ir %s -import-objc-header %S/Inputs/nested_imported_type_context_descriptor.h | %FileCheck %s
// REQUIRES: objc_interop

// Nominal type descriptors for the imported type X and both of its nested
// anonymous struct should get emitted as ODR.
Expand Down
2 changes: 0 additions & 2 deletions test/IRGen/objc_block.sil
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil %s -emit-ir | %FileCheck %s

// REQUIRES: objc_interop

sil_stage canonical

import Swift
Expand Down
3 changes: 1 addition & 2 deletions test/IRGen/objc_block_storage.sil
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -gnone -sdk %S/Inputs %s -emit-ir | %FileCheck %s
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -gnone -enable-objc-interop -sdk %S/Inputs %s -emit-ir | %FileCheck %s

// REQUIRES: CPU=x86_64
// REQUIRES: objc_interop

sil_stage canonical

Expand Down
3 changes: 1 addition & 2 deletions test/IRGen/objc_bridged_generic_conformance.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// 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
// REQUIRES: objc_interop
// 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

// CHECK-NOT: _TMnCSo

Expand Down
4 changes: 1 addition & 3 deletions test/IRGen/objc_class_empty_fields.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -primary-file %s -emit-ir | %FileCheck %s --check-prefix=CHECK-%target-ptrsize

// REQUIRES: objc_interop
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -primary-file %s -enable-objc-interop -emit-ir | %FileCheck %s --check-prefix=CHECK-%target-ptrsize

// SR-1055

Expand Down
4 changes: 1 addition & 3 deletions test/IRGen/objc_class_in_storage_decls.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
// RUN: %target-swift-frontend -emit-ir -disable-objc-attr-requires-foundation-module %s | %FileCheck %s

// REQUIRES: objc_interop
// RUN: %target-swift-frontend -emit-ir -enable-objc-interop -disable-objc-attr-requires-foundation-module %s | %FileCheck %s

struct WrapperStruct {
subscript() -> Void {
Expand Down
3 changes: 1 addition & 2 deletions test/IRGen/objc_class_property.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil %s -emit-ir -disable-objc-attr-requires-foundation-module | %FileCheck %s
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil %s -emit-ir -enable-objc-interop -disable-objc-attr-requires-foundation-module | %FileCheck %s

// REQUIRES: CPU=x86_64
// REQUIRES: objc_interop

// Class properties get reflected to ObjC as class methods. ObjC does not have
// class properties, so no ObjC property is reflected.
Expand Down
6 changes: 2 additions & 4 deletions test/IRGen/objc_generic_protocol_conformance.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
// 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
// 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

// REQUIRES: objc_interop
// 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
// 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

protocol P {
func foo()
Expand Down
2 changes: 0 additions & 2 deletions test/IRGen/objc_protocol_multi_file.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
// 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

// REQUIRES: objc_interop

// This used to crash <rdar://problem/17929944>.
// To tickle the crash, SubProto must not be used elsewhere in this file.
protocol SubProto : BaseProto {}
Expand Down
8 changes: 3 additions & 5 deletions test/IRGen/objc_runtime_visible.sil
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
// REQUIRES: objc_interop

// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -I %S/../Inputs/custom-modules %s -emit-ir | %FileCheck %s
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -enable-objc-interop -I %S/../Inputs/custom-modules %s -emit-ir | %FileCheck %s

sil_stage raw

Expand All @@ -11,7 +9,7 @@ import ObjCRuntimeVisible

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

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

// CHECK: define swiftcc void @deallocA(%TSo1AC*) #0 {
// CHECK: define {{(protected )?}}swiftcc void @deallocA(%TSo1AC*) #0 {
sil @deallocA : $@convention(thin) (@owned A) -> () {
bb0(%0 : $A):
%1 = metatype $@thick A.Type
Expand Down
6 changes: 2 additions & 4 deletions test/IRGen/objc_runtime_visible_conformance.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
// REQUIRES: objc_interop

// RUN: %target-swift-frontend -I %S/../Inputs/custom-modules %s -emit-ir | %FileCheck %s
// RUN: %target-swift-frontend -enable-objc-interop -I %S/../Inputs/custom-modules %s -emit-ir | %FileCheck %s

import ObjCRuntimeVisible

Expand All @@ -10,7 +8,7 @@ protocol YourProtocol {}
extension A : MyProtocol {}
extension A : YourProtocol {}

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

// CHECK-LABEL: define linkonce_odr hidden swiftcc %swift.metadata_response @"$SSo1ACMa"({{i32|i64}}) {{.*}} {
// CHECK: call %objc_class* @objc_lookUpClass
Expand Down
8 changes: 3 additions & 5 deletions test/IRGen/objc_selector.sil
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir %s | %FileCheck %s

// REQUIRES: objc_interop
// RUN: %target-swift-frontend -enable-objc-interop -assume-parsing-unqualified-ownership-sil -emit-ir %s | %FileCheck %s

sil_stage canonical

import Builtin

// CHECK: @"\01L_selector_data(help:me:)" = private global [9 x i8] c"help:me:\00", section "__TEXT,__objc_methname,cstring_literals"
// 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"
// CHECK: @"\01L_selector_data(help:me:)" = private global [9 x i8] c"help:me:\00"
// 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)

// CHECK-LABEL: define{{( dllexport)?}}{{( protected)?}} swiftcc i8* @objc_selector_literal() #0 {
sil @objc_selector_literal : $@convention(thin) () -> Builtin.RawPointer {
Expand Down
5 changes: 2 additions & 3 deletions test/IRGen/objc_subscripts.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -primary-file %s -emit-ir -disable-objc-attr-requires-foundation-module | %FileCheck %s
// 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

// REQUIRES: CPU=x86_64
// REQUIRES: objc_interop

// CHECK: @_INSTANCE_METHODS__TtC15objc_subscripts10SomeObject =
// CHECK: private constant { i32, i32, [5 x { i8*, i8*, i8* }] }
Expand Down Expand Up @@ -34,7 +33,7 @@
// CHECK: { i8*, i8*, i8* }
// 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*) }
// CHECK: ]
// CHECK: }, section "__DATA, __objc_const", align 8
// CHECK: }

@objc class SomeObject {
subscript (i : Int) -> SomeObject {
Expand Down
1 change: 0 additions & 1 deletion test/IRGen/protocol_metadata.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -primary-file %s -emit-ir -disable-objc-attr-requires-foundation-module | %FileCheck %s

// REQUIRES: CPU=x86_64
// REQUIRES: objc_interop

protocol A { func a() }
protocol B { func b() }
Expand Down
12 changes: 11 additions & 1 deletion test/IRGen/sanitize_coverage.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// XFAIL: linux
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir -sanitize=address -sanitize-coverage=func %s | %FileCheck %s -check-prefix=SANCOV
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir -sanitize=address -sanitize-coverage=bb %s | %FileCheck %s -check-prefix=SANCOV
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir -sanitize=address -sanitize-coverage=edge %s | %FileCheck %s -check-prefix=SANCOV
Expand All @@ -9,14 +8,25 @@
// 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
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir -sanitize=fuzzer %s | %FileCheck %s -check-prefix=SANCOV -check-prefix=SANCOV_TRACE_CMP

#if os(iOS) || os(macOS) || os(tvOS) || os(watchOS)
import Darwin
#elseif os(Android) || os(Cygwin) || os(FreeBSD) || os(Linux)
import Glibc
#elseif os(Windows)
import MSVCRT
#endif

// FIXME: We should have a reliable way of triggering an indirect call in the
// LLVM IR generated from this code.
func test() {
// Use random numbers so the compiler can't constant fold
#if os(iOS) || os(macOS) || os(tvOS) || os(watchOS)
let x = arc4random()
let y = arc4random()
#else
let x = rand()
let y = rand()
#endif
// Comparison is to trigger insertion of __sanitizer_cov_trace_cmp
let z = x == y
print("\(z)")
Expand Down
3 changes: 1 addition & 2 deletions test/IRGen/sil_generic_witness_methods_objc.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -primary-file %s -emit-ir -disable-objc-attr-requires-foundation-module | %FileCheck %s
// 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

// REQUIRES: CPU=x86_64
// REQUIRES: objc_interop

// FIXME: These should be SIL tests, but we can't parse generic types in SIL
// yet.
Expand Down
5 changes: 2 additions & 3 deletions test/IRGen/subclass.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -primary-file %s -emit-ir | %FileCheck %s
// RUN: %target-swift-frontend -enable-objc-interop -assume-parsing-unqualified-ownership-sil -primary-file %s -emit-ir | %FileCheck %s

// REQUIRES: CPU=x86_64
// REQUIRES: objc_interop

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

class A {
var x = 0
Expand Down
Loading