|
1 |
| -// RUN: %target-swift-frontend -sdk %S/Inputs -emit-silgen -I %S/Inputs -enable-source-import %s -disable-objc-attr-requires-foundation-module | %FileCheck %s |
2 |
| - |
3 |
| -// FIXME: rdar://problem/19648117 Needs splitting objc parts out |
4 |
| -// XFAIL: linux |
5 |
| - |
6 |
| -import gizmo |
7 |
| - |
8 |
| -// TODO: Generic base classes |
| 1 | +// RUN: %target-swift-frontend -emit-silgen %s | %FileCheck %s |
9 | 2 |
|
10 | 3 | // Test for compilation order independence
|
11 | 4 | class C : B {
|
@@ -73,64 +66,6 @@ class B : A {
|
73 | 66 | // CHECK: #B.zang!1: {{.*}} : _T07vtables1BC4zang{{[_0-9a-zA-Z]*}}F
|
74 | 67 | // CHECK: }
|
75 | 68 |
|
76 |
| -// Test ObjC base class |
77 |
| - |
78 |
| -class Hoozit : Gizmo { |
79 |
| - // Overrides Gizmo.frob |
80 |
| - override func frob() {} |
81 |
| - // Overrides Gizmo.funge |
82 |
| - override func funge() {} |
83 |
| - |
84 |
| - func anse() {} |
85 |
| - func incorrige() {} |
86 |
| -} |
87 |
| - |
88 |
| -// Entries only exist for native Swift methods |
89 |
| - |
90 |
| -// CHECK: sil_vtable Hoozit { |
91 |
| -// CHECK-NEXT: #Hoozit.anse!1: {{.*}} : _T07vtables6HoozitC4anse{{[_0-9a-zA-Z]*}}F |
92 |
| -// CHECK-NEXT: #Hoozit.incorrige!1: {{.*}} : _T07vtables6HoozitC9incorrige{{[_0-9a-zA-Z]*}}F |
93 |
| -// CHECK-NEXT: #Hoozit.init!initializer.1: (Hoozit.Type) -> () -> Hoozit! : _T07vtables6HoozitCSQyACGycfc |
94 |
| -// CHECK-NEXT: #Hoozit.init!initializer.1: (Hoozit.Type) -> (Int) -> Hoozit! : _T07vtables6HoozitCSQyACGSi7bellsOn_tcfc |
95 |
| -// CHECK-NEXT: #Hoozit.deinit!deallocator: _T07vtables6HoozitCfD |
96 |
| -// CHECK-NEXT: } |
97 |
| - |
98 |
| -class Wotsit : Hoozit { |
99 |
| - override func funge() {} |
100 |
| - override func incorrige() {} |
101 |
| -} |
102 |
| - |
103 |
| -// CHECK: sil_vtable Wotsit { |
104 |
| -// CHECK-NEXT: #Hoozit.anse!1: {{.*}} : _T07vtables6HoozitC4anse{{[_0-9a-zA-Z]*}}F |
105 |
| -// CHECK-NEXT: #Hoozit.incorrige!1: {{.*}} : _T07vtables6WotsitC9incorrige{{[_0-9a-zA-Z]*}}F |
106 |
| -// CHECK-NEXT: #Hoozit.init!initializer.1: (Hoozit.Type) -> () -> Hoozit! : _T07vtables6WotsitCSQyACGycfc |
107 |
| -// CHECK-NEXT: #Hoozit.init!initializer.1: (Hoozit.Type) -> (Int) -> Hoozit! : _T07vtables6WotsitCSQyACGSi7bellsOn_tcfc |
108 |
| -// CHECK-NEXT: #Wotsit.deinit!deallocator: _T07vtables6WotsitCfD |
109 |
| -// CHECK-NEXT: } |
110 |
| - |
111 |
| -// <rdar://problem/15282548> |
112 |
| -// CHECK: sil_vtable Base { |
113 |
| -// CHECK: #Base.init!initializer.1: {{.*}} : _T07vtables4BaseC{{[_0-9a-zA-Z]*}}fc |
114 |
| -// CHECK: } |
115 |
| -// CHECK: sil_vtable Derived { |
116 |
| -// CHECK: #Base.init!initializer.1: {{.*}} : _T07vtables7DerivedC{{[_0-9a-zA-Z]*}}fc |
117 |
| -// CHECK: } |
118 |
| -@objc class Base {} |
119 |
| - |
120 |
| -extension Base { |
121 |
| - // note: does not have a vtable slot, because it is from an extension |
122 |
| - func identify() -> Int { |
123 |
| - return 0 |
124 |
| - } |
125 |
| -} |
126 |
| - |
127 |
| -class Derived : Base { |
128 |
| - override func identify() -> Int { |
129 |
| - return 1 |
130 |
| - } |
131 |
| -} |
132 |
| - |
133 |
| - |
134 | 69 | // CHECK: sil_vtable RequiredInitDerived {
|
135 | 70 | // CHECK-NEXT: #SimpleInitBase.init!initializer.1: {{.*}} : _T07vtables19RequiredInitDerivedC{{[_0-9a-zA-Z]*}}fc
|
136 | 71 | // CHECK-NEXT #RequiredInitDerived.init!allocator.1: {{.*}} : _TFC7vtables19RequiredInitDerivedC
|
|
0 commit comments