File: vtable.sil

package info (click to toggle)
swiftlang 6.0.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,519,992 kB
  • sloc: cpp: 9,107,863; ansic: 2,040,022; asm: 1,135,751; python: 296,500; objc: 82,456; f90: 60,502; lisp: 34,951; pascal: 19,946; sh: 18,133; perl: 7,482; ml: 4,937; javascript: 4,117; makefile: 3,840; awk: 3,535; xml: 914; fortran: 619; cs: 573; ruby: 573
file content (47 lines) | stat: -rw-r--r-- 1,813 bytes parent folder | download
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
}