|
| 1 | +// RUN: %empty-directory(%t) |
| 2 | + |
| 3 | +// RUN: %target-swift-frontend -emit-silgen %S/Inputs/accessibility_vtables_usableFromInline_helper.swift | %FileCheck %s --check-prefix=LIBRARY |
| 4 | +// RUN: %target-swift-frontend -enable-library-evolution -emit-silgen %S/Inputs/accessibility_vtables_usableFromInline_helper.swift | %FileCheck %s --check-prefix=LIBRARY |
| 5 | + |
| 6 | +// RUN: %target-swift-frontend -emit-module -o %t %S/Inputs/accessibility_vtables_usableFromInline_helper.swift |
| 7 | +// RUN: %target-swift-emit-silgen -primary-file %s -I %t | %FileCheck %s --check-prefix=FRAGILE-CLIENT |
| 8 | + |
| 9 | +// RUN: %target-swift-frontend -enable-library-evolution -emit-module -o %t %S/Inputs/accessibility_vtables_usableFromInline_helper.swift |
| 10 | +// RUN: %target-swift-emit-silgen -primary-file %s -I %t | %FileCheck %s --check-prefix=RESILIENT-CLIENT |
| 11 | + |
| 12 | +import accessibility_vtables_usableFromInline_helper |
| 13 | + |
| 14 | +public class Derived : Middle { |
| 15 | + open override func internalMethod() {} |
| 16 | + open override func usableFromInlineMethod() {} |
| 17 | +} |
| 18 | + |
| 19 | +// LIBRARY-LABEL: sil_vtable {{(\[serialized\] )?}}Base { |
| 20 | +// LIBRARY-NEXT: #Base.internalMethod: (Base) -> () -> () : @$s45accessibility_vtables_usableFromInline_helper4BaseC14internalMethodyyF |
| 21 | +// LIBRARY-NEXT: #Base.usableFromInlineMethod: (Base) -> () -> () : @$s45accessibility_vtables_usableFromInline_helper4BaseC0cdE6MethodyyF |
| 22 | +// LIBRARY-NEXT: #Base.init!allocator: (Base.Type) -> () -> Base : @$s45accessibility_vtables_usableFromInline_helper4BaseCACycfC |
| 23 | +// LIBRARY-NEXT: #Base.deinit!deallocator: @$s45accessibility_vtables_usableFromInline_helper4BaseCfD |
| 24 | +// LIBRARY-NEXT: } |
| 25 | + |
| 26 | +// LIBRARY-LABEL: sil_vtable {{(\[serialized\] )?}}Middle { |
| 27 | +// LIBRARY-NEXT: #Base.internalMethod: (Base) -> () -> () : @$s45accessibility_vtables_usableFromInline_helper6MiddleC14internalMethodyyFAA4BaseCADyyFTV [override] |
| 28 | +// LIBRARY-NEXT: #Base.usableFromInlineMethod: (Base) -> () -> () : @$s45accessibility_vtables_usableFromInline_helper6MiddleC0cdE6MethodyyF [override] |
| 29 | +// LIBRARY-NEXT: #Base.init!allocator: (Base.Type) -> () -> Base : @$s45accessibility_vtables_usableFromInline_helper6MiddleCACycfC [override] |
| 30 | +// LIBRARY-NEXT: #Middle.internalMethod: (Middle) -> () -> () : @$s45accessibility_vtables_usableFromInline_helper6MiddleC14internalMethodyyF |
| 31 | +// LIBRARY-NEXT: #Middle.deinit!deallocator: @$s45accessibility_vtables_usableFromInline_helper6MiddleCfD |
| 32 | +// LIBRARY-NEXT: } |
| 33 | + |
| 34 | +// FRAGILE-CLIENT-LABEL: sil_vtable [serialized] Derived { |
| 35 | +// FRAGILE-CLIENT-NEXT: #Base.internalMethod: (Base) -> () -> () : @$s45accessibility_vtables_usableFromInline_helper6MiddleC14internalMethodyyFAA4BaseCADyyFTV [inherited] |
| 36 | +// FRAGILE-CLIENT-NEXT: #Base.usableFromInlineMethod: (Base) -> () -> () : @$s38accessibility_vtables_usableFromInline7DerivedC0cdE6MethodyyF [override] |
| 37 | +// FRAGILE-CLIENT-NEXT: #Base.init!allocator: (Base.Type) -> () -> Base : @$s45accessibility_vtables_usableFromInline_helper6MiddleCACycfC [inherited] |
| 38 | +// FRAGILE-CLIENT-NEXT: #Middle.internalMethod: (Middle) -> () -> () : @$s38accessibility_vtables_usableFromInline7DerivedC14internalMethodyyF [override] |
| 39 | +// FRAGILE-CLIENT-NEXT: #Derived.deinit!deallocator: @$s38accessibility_vtables_usableFromInline7DerivedCfD |
| 40 | + |
| 41 | +// FRAGILE-CLIENT-NEXT: } |
| 42 | + |
| 43 | +// RESILIENT-CLIENT-LABEL: sil_vtable [serialized] Derived { |
| 44 | +// RESILIENT-CLIENT-NEXT: #Base.usableFromInlineMethod: (Base) -> () -> () : @$s38accessibility_vtables_usableFromInline7DerivedC0cdE6MethodyyF [override] |
| 45 | +// RESILIENT-CLIENT-NEXT: #Middle.internalMethod: (Middle) -> () -> () : @$s38accessibility_vtables_usableFromInline7DerivedC14internalMethodyyF [override] |
| 46 | +// RESILIENT-CLIENT-NEXT: #Derived.deinit!deallocator: @$s38accessibility_vtables_usableFromInline7DerivedCfD |
| 47 | +// RESILIENT-CLIENT-NEXT: } |
0 commit comments