File: accessibility_vtables_package.swift

package info (click to toggle)
swiftlang 6.1.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,791,532 kB
  • sloc: cpp: 9,901,743; ansic: 2,201,431; asm: 1,091,827; python: 308,252; objc: 82,166; f90: 80,126; lisp: 38,358; pascal: 25,559; sh: 20,429; ml: 5,058; perl: 4,745; makefile: 4,484; awk: 3,535; javascript: 3,018; xml: 918; fortran: 664; cs: 573; ruby: 396
file content (27 lines) | stat: -rw-r--r-- 1,844 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// RUN: %empty-directory(%t)

// RUN: %target-swift-frontend -emit-silgen %S/Inputs/accessibility_vtables_package_helper.swift -package-name Package | %FileCheck %s --check-prefix=LIBRARY
// RUN: %target-swift-frontend -enable-library-evolution -emit-silgen %S/Inputs/accessibility_vtables_package_helper.swift -package-name Package | %FileCheck %s --check-prefix=LIBRARY

// RUN: %target-swift-frontend -emit-module -o %t %S/Inputs/accessibility_vtables_package_helper.swift -package-name Package
// RUN: %target-swift-emit-silgen -primary-file %s -I %t -package-name Package | %FileCheck %s --check-prefix=CLIENT

// RUN: %target-swift-frontend -enable-library-evolution -emit-module -o %t %S/Inputs/accessibility_vtables_package_helper.swift -package-name Package
// RUN: %target-swift-emit-silgen -primary-file %s -I %t -package-name Package | %FileCheck %s --check-prefix=CLIENT

import accessibility_vtables_package_helper

// LIBRARY-LABEL: sil_vtable Base {
// LIBRARY-NEXT:    #Base.packageMethod: (Base) -> () -> () : @$s36accessibility_vtables_package_helper4BaseC0C6MethodyyF
// LIBRARY-NEXT:    #Base.internalMethod: (Base) -> () -> () : @$s36accessibility_vtables_package_helper4BaseC14internalMethodyyF
// LIBRARY-NEXT:    #Base.init!allocator: (Base.Type) -> () -> Base : @$s36accessibility_vtables_package_helper4BaseCACycfC
// LIBRARY-NEXT:    #Base.deinit!deallocator: @$s36accessibility_vtables_package_helper4BaseCfD
// LIBRARY-NEXT:  }

// CLIENT-LABEL: sil hidden [ossa] @$s29accessibility_vtables_package15usePackageClassyy0a1_b1_C7_helper4BaseCF : $@convention(thin) (@guaranteed Base) -> () {
func usePackageClass(_ c: Base) {
  c.packageMethod()
}

// TODO: If cross-module inheritance from package visibility superclasses ever becomes a thing,
// test serialization of the vtable for the derived class in this file.