File: vtable.sil

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 (47 lines) | stat: -rw-r--r-- 1,813 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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
// RUN: %target-swift-frontend -enable-objc-interop -emit-ir %s | %FileCheck %s --check-prefixes=CHECK,CHECK-objc,CHECK-%target-import-type-objc
// RUN: %target-swift-frontend -disable-objc-interop -emit-ir %s | %FileCheck %s --check-prefixes=CHECK,CHECK-native

// REQUIRES: CPU=x86_64

sil_stage canonical

import Builtin
import Swift

class C {
  required init()
}

sil @$s6vtable1CCACycACmcfC : $@convention(method) (@thick C.Type) -> @owned C
sil @$s6vtable1CCfd : $@convention(method) (@owned C) -> @owned Builtin.NativeObject
sil @$s6vtable1CCfD : $@convention(method) (@owned C) -> ()

// CHECK-objc: @"$s6vtable1CCMf" = internal global [[C_METADATA_T:<{.*}>]] <{
// CHECK-objc:          ptr @"$s6vtable1CCfD",
// CHECK-objc:          ptr {{@"\$sBoWV"|null}},
// CHECK-objc:          i64 ptrtoint (ptr @"$s6vtable1CCMm" to i64),
// CHECK-DIRECT-objc:   ptr @"OBJC_CLASS_$_{{(_TtCs12_)?}}SwiftObject",
// CHECK-INDIRECT-objc: ptr null,
// CHECK-objc:          ptr @_objc_empty_cache,
// CHECK-objc:          ptr null,
// CHECK-objc:          i64 add (i64 ptrtoint (ptr @_DATA__TtC6vtable1C to i64), i64 {{1|2}}),
// CHECK-objc:          i32 {{3|2}}, i32 0, i32 16, i16 7, i16 0,
// CHECK-objc:          i32 112, i32 24,
// CHECK-objc:          @"$s6vtable1CCMn"
// CHECK-objc:          ptr @"$s6vtable1CCACycACmcfC"
// CHECK-objc:  }>

// CHECK-native: @"$s6vtable1CCMf" = internal global [[C_METADATA_T:<{.*}>]] <{
// CHECK-native: ptr @"$s6vtable1CCfD",
// CHECK-native: ptr {{@"\$sBoWV"|null}},
// CHECK-native: i64 0,
// CHECK-native: ptr null,
// CHECK-native: i32 {{3|2}}, i32 0, i32 16, i16 7, i16 0,
// CHECK-native: i32 88, i32 24,
// CHECK-native: @"$s6vtable1CCMn"
// CHECK-native: ptr @"$s6vtable1CCACycACmcfC"
// CHECK-native: }>

sil_vtable C {
  #C.init!allocator: @$s6vtable1CCACycACmcfC
}