Skip to content

test: triplicate a test #14063

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
Jan 24, 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
29 changes: 29 additions & 0 deletions test/IRGen/COFF-objc-sections.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// RUN: %swift -target x86_64-unknown-windows-msvc -parse-stdlib -enable-objc-interop -disable-objc-attr-requires-foundation-module -I %S/Inputs/usr/include -emit-ir %s -o - | %FileCheck %s -check-prefix CHECK-COFF

// REQUIRES: OS=windows

import ObjCInterop

@objc
class C {
}

extension C : P {
public func method() {
f(I())
}
}

@_objc_non_lazy_realization
class D {
}

// CHECK-COFF-NOT: @"$S4main1CCMf" = {{.*}}, section "__DATA,__objc_data, regular"
// CHECK-COFF: @"\01l_OBJC_LABEL_PROTOCOL_$_P" = {{.*}}, section ".objc_protolist$B"
// CHECK-COFF: @"\01l_OBJC_PROTOCOL_REFERENCE_$_P" = {{.*}}, section ".objc_protorefs$B"
// CHECK-COFF: @"OBJC_CLASS_REF_$_I" = {{.*}}, section ".objc_classrefs$B"
// CHECK-COFF: @"\01L_selector(init)" = {{.*}}, section ".objc_selrefs$B"
// CHECK-COFF: @objc_classes = {{.*}}, section ".objc_classlist$B"
// CHECK-COFF: @objc_categories = {{.*}}, section ".objc_catlist$B"
// CHECK-COFF: @objc_non_lazy_classes = {{.*}}, section ".objc_nlclslist$B"

29 changes: 29 additions & 0 deletions test/IRGen/ELF-objc-sections.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// RUN: %swift -target x86_64-unknown-linux-gnu -parse-stdlib -enable-objc-interop -disable-objc-attr-requires-foundation-module -I %S/Inputs/usr/include -Xcc --sysroot=/var/empty -emit-ir %s -o - | %FileCheck %s -check-prefix CHECK-ELF

// REQUIRES: OS=linux-gnu

import ObjCInterop

@objc
class C {
}

extension C : P {
public func method() {
f(I())
}
}

@_objc_non_lazy_realization
class D {
}

// CHECK-ELF-NOT: @"$S4main1CCMf" = {{.*}}, section "__DATA,__objc_data, regular"
// CHECK-ELF: @"\01l_OBJC_LABEL_PROTOCOL_$_P" = {{.*}}, section "objc_protolist"
// CHECK-ELF: @"\01l_OBJC_PROTOCOL_REFERENCE_$_P" = {{.*}}, section "objc_protorefs", align 8
// CHECK-ELF: @"OBJC_CLASS_REF_$_I" = {{.*}}, section "objc_classrefs", align 8
// CHECK-ELF: @"\01L_selector(init)" = {{.*}}, section "objc_selrefs"
// CHECK-ELF: @objc_classes = {{.*}}, section "objc_classlist"
// CHECK-ELF: @objc_categories = {{.*}}, section "objc_catlist"
// CHECK-ELF: @objc_non_lazy_classes = {{.*}}, section "objc_nlclslist", align 8

29 changes: 29 additions & 0 deletions test/IRGen/MachO-objc-sections.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// RUN: %swift -target x86_64-apple-ios8.0 -parse-stdlib -enable-objc-interop -disable-objc-attr-requires-foundation-module -I %S/Inputs/usr/include -emit-ir %s -o - | %FileCheck %s -check-prefix CHECK-MACHO

// REQUIRES: OS=ios

import ObjCInterop

@objc
class C {
}

extension C : P {
public func method() {
f(I())
}
}

@_objc_non_lazy_realization
class D {
}

// CHECK-MACHO: @"$S4main1CCMf" = {{.*}}, section "__DATA,__objc_data, regular"
// CHECK-MACHO: @"\01l_OBJC_LABEL_PROTOCOL_$_P" = {{.*}}, section "__DATA,__objc_protolist,coalesced,no_dead_strip"
// CHECK-MACHO: @"\01l_OBJC_PROTOCOL_REFERENCE_$_P" = {{.*}}, section "__DATA,__objc_protorefs,coalesced,no_dead_strip"
// CHECK-MACHO: @"OBJC_CLASS_REF_$_I" = {{.*}}, section "__DATA,__objc_classrefs,regular,no_dead_strip"
// CHECK-MACHO: @"\01L_selector(init)" = {{.*}}, section "__DATA,__objc_selrefs,literal_pointers,no_dead_strip"
// CHECK-MACHO: @objc_classes = {{.*}}, section "__DATA,__objc_classlist,regular,no_dead_strip"
// CHECK-MACHO: @objc_categories = {{.*}}, section "__DATA,__objc_catlist,regular,no_dead_strip"
// CHECK-MACHO: @objc_non_lazy_classes = {{.*}}, section "__DATA,__objc_nlclslist,regular,no_dead_strip"

47 changes: 0 additions & 47 deletions test/IRGen/objc-sections.swift

This file was deleted.