SIL: add printing and parsing support for specialized vtables

If the vtable refers to a specialized class, a SIL type specifies the bound generic class type:
```
  sil_vtable $G<Int> {
    // ...
  }
```
This commit is contained in:
Erik Eckstein
2024-02-13 11:39:26 +01:00
parent 61ed95a32f
commit 6e8b80c791
6 changed files with 59 additions and 22 deletions

View File

@@ -41,7 +41,7 @@ public func bar(t: T2) -> MyClass<T2> {
// CHECK-SIL: #MyClass.deinit!deallocator: @$s4main7MyClassCfDAA2T1V_Tg5 // specialized MyClass.__deallocating_deinit
// CHECK-SIL: }
// CHECK-SIL: sil_vtable MyClass {
// CHECK-SIL: sil_vtable $MyClass<T2> {
// CHECK-SIL: #MyClass.t!getter: <T> (MyClass<T>) -> () -> T : @$s4main7MyClassC1txvgAA2T2V_Tg5 // specialized MyClass.t.getter
// CHECK-SIL: #MyClass.t!setter: <T> (MyClass<T>) -> (T) -> () : @$s4main7MyClassC1txvsAA2T2V_Tg5 // specialized MyClass.t.setter
// CHECK-SIL: #MyClass.t!modify: <T> (MyClass<T>) -> () -> () : @$s4main7MyClassC1txvMAA2T2V_Tg5 // specialized MyClass.t.modify