Skip to content

SIL: Print the '@' prefix for function names in sil_vtables and allow global SIL names starting with '$'. #13757

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 5, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions lib/Parse/Lexer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -852,8 +852,9 @@ void Lexer::lexDollarIdent() {
const char *tokStart = CurPtr-1;
assert(*tokStart == '$');

// In a SIL function body, '$' is a token by itself.
if (InSILBody)
// In a SIL function body, '$' is a token by itself, except it's a SIL global
// name. SIL global identifiers may start with a '$', e.g. @$S1m3fooyyF.
if (InSILBody && NextToken.getKind() != tok::at_sign)
return formToken(tok::sil_dollar, tokStart);

bool isAllDigits = true;
Expand Down Expand Up @@ -881,7 +882,7 @@ void Lexer::lexDollarIdent() {

// We reserve $nonNumeric for persistent bindings in the debugger.
if (!isAllDigits) {
if (!LangOpts.EnableDollarIdentifiers)
if (!LangOpts.EnableDollarIdentifiers && !InSILBody)
diagnose(tokStart, diag::expected_dollar_numeric);

// Even if we diagnose, we go ahead and form an identifier token,
Expand Down
2 changes: 2 additions & 0 deletions lib/ParseSIL/ParseSIL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,7 @@ bool SILParser::parseSILIdentifier(Identifier &Result, SourceLoc &Loc,
const Diagnostic &D) {
switch (P.Tok.getKind()) {
case tok::identifier:
case tok::dollarident:
Result = P.Context.getIdentifier(P.Tok.getText());
break;
case tok::string_literal: {
Expand Down Expand Up @@ -5277,6 +5278,7 @@ bool SILParserTUState::parseSILVTable(Parser &P) {
} else {
if (P.parseToken(tok::colon, diag::expected_sil_vtable_colon) ||
parseSILLinkage(Linkage, P) ||
P.parseToken(tok::at_sign, diag::expected_sil_function_name) ||
VTableState.parseSILIdentifier(FuncName, FuncLoc,
diag::expected_sil_value_name))
return true;
Expand Down
2 changes: 1 addition & 1 deletion lib/SIL/SILPrinter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2653,7 +2653,7 @@ void SILVTable::print(llvm::raw_ostream &OS, bool Verbose) const {
stripExternalFromLinkage(entry.Implementation->getLinkage())) {
OS << getLinkageString(entry.Linkage);
}
OS << entry.Implementation->getName();
OS << '@' << entry.Implementation->getName();
switch (entry.TheKind) {
case SILVTable::Entry::Kind::Normal:
break;
Expand Down
6 changes: 3 additions & 3 deletions test/IRGen/class.sil
Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,12 @@ sil public_external @alloc_RequiredBase : $@convention(method) (@thick RequiredB
sil public_external @init_RequiredBase : $@convention(method) (@owned RequiredBase) -> @owned RequiredBase

sil_vtable NonRequiredBase {
#NonRequiredBase.init!initializer.1: init_NonRequiredBase
#NonRequiredBase.init!initializer.1: @init_NonRequiredBase
}

sil_vtable RequiredBase {
#NonRequiredBase.init!initializer.1: init_RequiredBase
#RequiredBase.init!allocator.1: alloc_RequiredBase
#NonRequiredBase.init!initializer.1: @init_RequiredBase
#RequiredBase.init!allocator.1: @alloc_RequiredBase
}

// rdar://problem/19902523
Expand Down
2 changes: 1 addition & 1 deletion test/IRGen/dynamic_init.sil
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@ bb0(%0 : $@thick C.Type):
}

sil_vtable C {
#C.init!allocator.1: _T012dynamic_init1CCACycACmcfC // dynamic_init.C.__allocating_init (dynamic_init.C.Type)() -> dynamic_init.C
#C.init!allocator.1: @_T012dynamic_init1CCACycACmcfC // dynamic_init.C.__allocating_init (dynamic_init.C.Type)() -> dynamic_init.C
}
18 changes: 9 additions & 9 deletions test/IRGen/exactcast.sil
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,17 @@ sil @_TFC9pic_crash10ParentNodecfMS0_FT5indexSi_S0_ : $@convention(method) (Int,
sil @_TFC9pic_crash10ParentNodeCfMS0_FT5indexSi_S0_ : $@convention(thin) (Int, @thick ParentNode.Type) -> @owned ParentNode

sil_vtable Node {
#Node.init!initializer.1: _TFC9pic_crash4NodecfMS0_FT5indexSi_S0_ // pic_crash.Node.init (pic_crash.Node.Type)(index : Swift.Int) -> pic_crash.Node
#Node.check!1: _test_exact_checked_cast_branch // pic_crash.Node.check (pic_crash.Node)() -> Swift.Int
#Node.index!getter.1: _TFC9pic_crash4Nodeg5indexSi // pic_crash.Node.index.getter : Swift.Int
#Node.index!setter.1: _TFC9pic_crash4Nodes5indexSi // pic_crash.Node.index.setter : Swift.Int
#Node.init!initializer.1: @_TFC9pic_crash4NodecfMS0_FT5indexSi_S0_ // pic_crash.Node.init (pic_crash.Node.Type)(index : Swift.Int) -> pic_crash.Node
#Node.check!1: @_test_exact_checked_cast_branch // pic_crash.Node.check (pic_crash.Node)() -> Swift.Int
#Node.index!getter.1: @_TFC9pic_crash4Nodeg5indexSi // pic_crash.Node.index.getter : Swift.Int
#Node.index!setter.1: @_TFC9pic_crash4Nodes5indexSi // pic_crash.Node.index.setter : Swift.Int
}

sil_vtable ParentNode {
#Node.init!initializer.1: _TFC9pic_crash10ParentNodecfMS0_FT5indexSi_S0_ // pic_crash.ParentNode.init (pic_crash.ParentNode.Type)(index : Swift.Int) -> pic_crash.ParentNode
#Node.check!1: _test_exact_checked_cast_branch // pic_crash.Node.check (pic_crash.Node)() -> Swift.Int
#Node.index!getter.1: _TFC9pic_crash4Nodeg5indexSi // pic_crash.Node.index.getter : Swift.Int
#Node.index!setter.1: _TFC9pic_crash4Nodes5indexSi // pic_crash.Node.index.setter : Swift.Int
#ParentNode.init!initializer.1: _TFC9pic_crash10ParentNodecfMS0_FT4leftCS_4Node5rightS1_5indexSi_S0_ // pic_crash.ParentNode.init (pic_crash.ParentNode.Type)(left : pic_crash.Node, right : pic_crash.Node, index : Swift.Int) -> pic_crash.ParentNode
#Node.init!initializer.1: @_TFC9pic_crash10ParentNodecfMS0_FT5indexSi_S0_ // pic_crash.ParentNode.init (pic_crash.ParentNode.Type)(index : Swift.Int) -> pic_crash.ParentNode
#Node.check!1: @_test_exact_checked_cast_branch // pic_crash.Node.check (pic_crash.Node)() -> Swift.Int
#Node.index!getter.1: @_TFC9pic_crash4Nodeg5indexSi // pic_crash.Node.index.getter : Swift.Int
#Node.index!setter.1: @_TFC9pic_crash4Nodes5indexSi // pic_crash.Node.index.setter : Swift.Int
#ParentNode.init!initializer.1: @_TFC9pic_crash10ParentNodecfMS0_FT4leftCS_4Node5rightS1_5indexSi_S0_ // pic_crash.ParentNode.init (pic_crash.ParentNode.Type)(left : pic_crash.Node, right : pic_crash.Node, index : Swift.Int) -> pic_crash.ParentNode
}

12 changes: 6 additions & 6 deletions test/IRGen/exactcast2.sil
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,15 @@ sil @_TFC4main3MD5cfMS0_FT_S0_ : $@convention(method) (@owned MD5) -> @owned MD5
sil @_TFC4main3MD5CfMS0_FT_S0_ : $@convention(thin) (@thick MD5.Type) -> @owned MD5

sil_vtable Hash {
#Hash.init!initializer.1: _TFC4main4HashcfMS0_FT_S0_ // main.Hash.init (main.Hash.Type)() -> main.Hash
#Hash.update!1: _TFC4main4Hash6updatefS0_FT_T_ // main.Hash.update (main.Hash)() -> ()
#Hash.hash!1: _TFC4main4Hash4hashfS0_FT_T_ // main.Hash.hash (main.Hash)() -> ()
#Hash.init!initializer.1: @_TFC4main4HashcfMS0_FT_S0_ // main.Hash.init (main.Hash.Type)() -> main.Hash
#Hash.update!1: @_TFC4main4Hash6updatefS0_FT_T_ // main.Hash.update (main.Hash)() -> ()
#Hash.hash!1: @_TFC4main4Hash4hashfS0_FT_T_ // main.Hash.hash (main.Hash)() -> ()
}

sil_vtable MD5 {
#Hash.init!initializer.1: _TFC4main3MD5cfMS0_FT_S0_ // main.MD5.init (main.MD5.Type)() -> main.MD5
#Hash.update!1: _TFC4main4Hash6updatefS0_FT_T_ // main.Hash.update (main.Hash)() -> ()
#Hash.hash!1: _TFC4main4Hash4hashfS0_FT_T_ // main.Hash.hash (main.Hash)() -> ()
#Hash.init!initializer.1: @_TFC4main3MD5cfMS0_FT_S0_ // main.MD5.init (main.MD5.Type)() -> main.MD5
#Hash.update!1: @_TFC4main4Hash6updatefS0_FT_T_ // main.Hash.update (main.Hash)() -> ()
#Hash.hash!1: @_TFC4main4Hash4hashfS0_FT_T_ // main.Hash.hash (main.Hash)() -> ()
}


Expand Down
18 changes: 9 additions & 9 deletions test/IRGen/generic_classes.sil
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,9 @@ sil @_TFC15generic_classes11RootGeneric3barU__fGS0_Q__FT_T_ : $@convention(metho
sil @_TFC15generic_classes11RootGeneric3basU__fGS0_Q__FT_T_ : $@convention(method) <T> (@guaranteed RootGeneric<T>) -> ()

sil_vtable RootGeneric {
#RootGeneric.foo!1: _TFC15generic_classes11RootGeneric3fooU__fGS0_Q__FT_T_
#RootGeneric.bar!1: _TFC15generic_classes11RootGeneric3barU__fGS0_Q__FT_T_
#RootGeneric.bas!1: _TFC15generic_classes11RootGeneric3basU__fGS0_Q__FT_T_
#RootGeneric.foo!1: @_TFC15generic_classes11RootGeneric3fooU__fGS0_Q__FT_T_
#RootGeneric.bar!1: @_TFC15generic_classes11RootGeneric3barU__fGS0_Q__FT_T_
#RootGeneric.bas!1: @_TFC15generic_classes11RootGeneric3basU__fGS0_Q__FT_T_
}

class RootGenericFixedLayout<T> {
Expand Down Expand Up @@ -174,12 +174,12 @@ sil @_TFC15generic_classes22GenericInheritsGeneric3dooU___fGS0_Q_Q0__FT_T_ : $@c
sil @_TFC15generic_classes22GenericInheritsGeneric3dahU___fGS0_Q_Q0__FT_T_ : $@convention(method) <A, B> (@guaranteed GenericInheritsGeneric<A, B>) -> ()

sil_vtable GenericInheritsGeneric {
#RootGeneric.foo!1: _TFC15generic_classes11RootGeneric3fooU__fGS0_Q__FT_T_ [inherited]
#RootGeneric.bar!1: _TFC15generic_classes11RootGeneric3barU__fGS0_Q__FT_T_ [inherited]
#RootGeneric.bas!1: _TFC15generic_classes11RootGeneric3basU__fGS0_Q__FT_T_ [inherited]
#GenericInheritsGeneric.zippity!1: _TFC15generic_classes22GenericInheritsGeneric7zippityU___fGS0_Q_Q0__FT_T_
#GenericInheritsGeneric.doo!1: _TFC15generic_classes22GenericInheritsGeneric3dooU___fGS0_Q_Q0__FT_T_
#GenericInheritsGeneric.dah!1: _TFC15generic_classes22GenericInheritsGeneric3dahU___fGS0_Q_Q0__FT_T_
#RootGeneric.foo!1: @_TFC15generic_classes11RootGeneric3fooU__fGS0_Q__FT_T_ [inherited]
#RootGeneric.bar!1: @_TFC15generic_classes11RootGeneric3barU__fGS0_Q__FT_T_ [inherited]
#RootGeneric.bas!1: @_TFC15generic_classes11RootGeneric3basU__fGS0_Q__FT_T_ [inherited]
#GenericInheritsGeneric.zippity!1: @_TFC15generic_classes22GenericInheritsGeneric7zippityU___fGS0_Q_Q0__FT_T_
#GenericInheritsGeneric.doo!1: @_TFC15generic_classes22GenericInheritsGeneric3dooU___fGS0_Q_Q0__FT_T_
#GenericInheritsGeneric.dah!1: @_TFC15generic_classes22GenericInheritsGeneric3dahU___fGS0_Q_Q0__FT_T_
}

class GenericInheritsNonGeneric<C> : RootNonGeneric {
Expand Down
8 changes: 4 additions & 4 deletions test/IRGen/ivar_destroyer.sil
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class TrivialBase {}
sil public_external @init_TrivialBase : $@convention(method) (@owned TrivialBase) -> @owned TrivialBase

sil_vtable TrivialBase {
#TrivialBase.init!initializer.1: init_TrivialBase
#TrivialBase.init!initializer.1: @init_TrivialBase
}

class NonTrivialDerived : TrivialBase {
Expand All @@ -51,7 +51,7 @@ sil public_external @alloc_NonTrivialDerived : $@convention(method) (@thick NonT
sil public_external @_T014ivar_destroyer17NonTrivialDerivedCfE : $@convention(method) (@guaranteed NonTrivialDerived) -> ()

sil_vtable NonTrivialDerived {
#NonTrivialDerived.init!initializer.1: init_NonTrivialDerived
#NonTrivialDerived.init!allocator.1: alloc_NonTrivialDerived
#NonTrivialDerived!ivardestroyer.1: _T014ivar_destroyer17NonTrivialDerivedCfE
#NonTrivialDerived.init!initializer.1: @init_NonTrivialDerived
#NonTrivialDerived.init!allocator.1: @alloc_NonTrivialDerived
#NonTrivialDerived!ivardestroyer.1: @_T014ivar_destroyer17NonTrivialDerivedCfE
}
2 changes: 1 addition & 1 deletion test/IRGen/nonatomic_reference_counting.sil
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,6 @@ bb0(%0 : $C):
}

sil_vtable C {
#C.deinit!deallocator: _TFC28nonatomic_reference_counting1CD // C.__deallocating_deinit
#C.deinit!deallocator: @_TFC28nonatomic_reference_counting1CD // C.__deallocating_deinit
}

2 changes: 1 addition & 1 deletion test/IRGen/objc_attr_NSManaged.sil
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,5 @@ sil @_T019objc_attr_NSManaged10SwiftGizmoC7bellsOnSQyACGSi_tcfc : $@convention(m
/* FIXME: sil_vtable parser picks the wrong 'init' overload. rdar://problem/19572342 */
sil_vtable SwiftGizmo {
// #SwiftGizmo.init!initializer.1: _T019objc_attr_NSManaged10SwiftGizmoCACycfc
#SwiftGizmo.init!initializer.1: _T019objc_attr_NSManaged10SwiftGizmoC7bellsOnACSi_tcfc
#SwiftGizmo.init!initializer.1: @_T019objc_attr_NSManaged10SwiftGizmoC7bellsOnACSi_tcfc
}
4 changes: 2 additions & 2 deletions test/IRGen/readonly.sil
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,6 @@ bb0(%0 : $*Any):
}

sil_vtable XXX {
#XXX.deinit!deallocator: XXX_dtor
#XXX.init!initializer.1: XXX_ctor
#XXX.deinit!deallocator: @XXX_dtor
#XXX.init!initializer.1: @XXX_ctor
}
8 changes: 4 additions & 4 deletions test/IRGen/super.sil
Original file line number Diff line number Diff line change
Expand Up @@ -186,13 +186,13 @@ bb0(%0 : $@thick ResilientOutsideChild.Type):
// CHECK: call swiftcc void

sil_vtable ChildToResilientParent {
#ResilientOutsideParent.method!1: _T05super22ChildToResilientParentC6methodyyF // super.ChildToResilientParent.method () -> ()
#ResilientOutsideParent.classMethod!1: _T05super22ChildToResilientParentC11classMethodyyFZ // static super.ChildToResilientParent.classMethod () -> ()
#ResilientOutsideParent.method!1: @_T05super22ChildToResilientParentC6methodyyF // super.ChildToResilientParent.method () -> ()
#ResilientOutsideParent.classMethod!1: @_T05super22ChildToResilientParentC11classMethodyyFZ // static super.ChildToResilientParent.classMethod () -> ()
}

sil_vtable ChildToFixedParent {
#OutsideParent.method!1: _T05super18ChildToFixedParentC6methodyyF // super.ChildToFixedParent.method () -> ()
#OutsideParent.classMethod!1: _T05super18ChildToFixedParentC11classMethodyyFZ // static super.ChildToFixedParent.classMethod () -> ()
#OutsideParent.method!1: @_T05super18ChildToFixedParentC6methodyyF // super.ChildToFixedParent.method () -> ()
#OutsideParent.classMethod!1: @_T05super18ChildToFixedParentC11classMethodyyFZ // static super.ChildToFixedParent.classMethod () -> ()
}

protocol Proto {
Expand Down
4 changes: 2 additions & 2 deletions test/IRGen/vtable.sil
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,6 @@ sil @_T06vtable1CCfD : $@convention(method) (@owned C) -> ()
// CHECK-native: }>

sil_vtable C {
#C.init!allocator.1: _T06vtable1CCACycACmcfC
#C.init!initializer.1: _T06vtable1CCACycACmcfc
#C.init!allocator.1: @_T06vtable1CCACycACmcfC
#C.init!initializer.1: @_T06vtable1CCACycACmcfc
}
20 changes: 10 additions & 10 deletions test/SIL/Parser/SILDeclRef.sil
Original file line number Diff line number Diff line change
Expand Up @@ -118,19 +118,19 @@ sil @_TF10SILDeclRef5testPFT1pPS_1P__Vs5Int32 : $@convention(thin) (@in P) -> In
sil @_TF10SILDeclRef8testBaseFT1bCS_4Base_Vs5Int32 : $@convention(thin) (@owned Base) -> Int32

sil_vtable Derived1 {
#Base.foo!1: (Base) -> () -> Int32 : _TFC10SILDeclRef8Derived13foofT_Vs5Int32 // Derived1.foo() -> Int32
#Base.foo!1: (Base) -> (Int32) -> () : _TFC10SILDeclRef8Derived13foofT1nVs5Int32_T_ // Derived1.foo(n : Int32) -> ()
#Base.foo!1: (Base) -> (Float) -> Int32 : _TFC10SILDeclRef8Derived13foofT1fSf_Vs5Int32 // Derived1.foo(f : Float) -> Int32
#Base.init!initializer.1: (Base.Type) -> () -> Base : _TFC10SILDeclRef8Derived1cfT_S0_ // Derived1.init() -> Derived1
#Derived1.deinit!deallocator: (Derived1) -> () -> () : _TFC10SILDeclRef8Derived1D // Derived1.__deallocating_deinit
#Base.foo!1: (Base) -> () -> Int32 : @_TFC10SILDeclRef8Derived13foofT_Vs5Int32 // Derived1.foo() -> Int32
#Base.foo!1: (Base) -> (Int32) -> () : @_TFC10SILDeclRef8Derived13foofT1nVs5Int32_T_ // Derived1.foo(n : Int32) -> ()
#Base.foo!1: (Base) -> (Float) -> Int32 : @_TFC10SILDeclRef8Derived13foofT1fSf_Vs5Int32 // Derived1.foo(f : Float) -> Int32
#Base.init!initializer.1: (Base.Type) -> () -> Base : @_TFC10SILDeclRef8Derived1cfT_S0_ // Derived1.init() -> Derived1
#Derived1.deinit!deallocator: (Derived1) -> () -> () : @_TFC10SILDeclRef8Derived1D // Derived1.__deallocating_deinit
}

sil_vtable Derived2 {
#Base.foo!1: (Base) -> () -> Int32 : _TFC10SILDeclRef8Derived23foofT_Vs5Int32 // Derived2.foo() -> Int32
#Base.foo!1: (Base) -> (Int32) -> () : _TFC10SILDeclRef8Derived23foofT1nVs5Int32_T_ // Derived2.foo(n : Int32) -> ()
#Base.foo!1: (Base) -> (Float) -> Int32 : _TFC10SILDeclRef8Derived23foofT1fSf_Vs5Int32 // Derived2.foo(f : Float) -> Int32
#Base.init!initializer.1: (Base.Type) -> () -> Base : _TFC10SILDeclRef8Derived2cfT_S0_ // Derived2.init() -> Derived2
#Derived2.deinit!deallocator: (Derived2) -> () -> () : _TFC10SILDeclRef8Derived2D // Derived2.__deallocating_deinit
#Base.foo!1: (Base) -> () -> Int32 : @_TFC10SILDeclRef8Derived23foofT_Vs5Int32 // Derived2.foo() -> Int32
#Base.foo!1: (Base) -> (Int32) -> () : @_TFC10SILDeclRef8Derived23foofT1nVs5Int32_T_ // Derived2.foo(n : Int32) -> ()
#Base.foo!1: (Base) -> (Float) -> Int32 : @_TFC10SILDeclRef8Derived23foofT1fSf_Vs5Int32 // Derived2.foo(f : Float) -> Int32
#Base.init!initializer.1: (Base.Type) -> () -> Base : @_TFC10SILDeclRef8Derived2cfT_S0_ // Derived2.init() -> Derived2
#Derived2.deinit!deallocator: (Derived2) -> () -> () : @_TFC10SILDeclRef8Derived2D // Derived2.__deallocating_deinit
}

sil_witness_table [serialized] Base: P module SILDeclRef {
Expand Down
8 changes: 4 additions & 4 deletions test/SIL/Parser/basic.sil
Original file line number Diff line number Diff line change
Expand Up @@ -1638,12 +1638,12 @@ bb0:
}

// CHECK-LABEL: sil_vtable Foo {
// CHECK: #Foo.subscript!getter.1: {{.*}} : hidden _TFC3tmp3Foog9subscriptFTVs5Int32S1__S1_
// CHECK: #Foo.subscript!setter.1: {{.*}} : _TFC3tmp3Foos9subscriptFTVs5Int32S1__S1_
// CHECK: #Foo.subscript!getter.1: {{.*}} : hidden @_TFC3tmp3Foog9subscriptFTVs5Int32S1__S1_
// CHECK: #Foo.subscript!setter.1: {{.*}} : @_TFC3tmp3Foos9subscriptFTVs5Int32S1__S1_
// CHECK: }
sil_vtable Foo {
// Override the linke to check if it is parsed correctly.
#Foo.subscript!getter.1: hidden _TFC3tmp3Foog9subscriptFTVs5Int32S1__S1_
#Foo.subscript!getter.1: hidden @_TFC3tmp3Foog9subscriptFTVs5Int32S1__S1_
// The public linkage is the same as the function's linkage and should not be printed.
#Foo.subscript!setter.1: public _TFC3tmp3Foos9subscriptFTVs5Int32S1__S1_
#Foo.subscript!setter.1: public @_TFC3tmp3Foos9subscriptFTVs5Int32S1__S1_
}
4 changes: 2 additions & 2 deletions test/SIL/Parser/function_named_subscript.sil
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ bb0(%0 : $SubscriptAsFunction):
}

sil_vtable SubscriptAsFunction {
// CHECK: #SubscriptAsFunction.`subscript`!1: (SubscriptAsFunction) -> () -> () : _T04test19SubscriptAsFunctionC9subscriptyyF
#SubscriptAsFunction.`subscript`!1: (SubscriptAsFunction) -> () -> () : _T04test19SubscriptAsFunctionC9subscriptyyF
// CHECK: #SubscriptAsFunction.`subscript`!1: (SubscriptAsFunction) -> () -> () : @_T04test19SubscriptAsFunctionC9subscriptyyF
#SubscriptAsFunction.`subscript`!1: (SubscriptAsFunction) -> () -> () : @_T04test19SubscriptAsFunctionC9subscriptyyF
}
2 changes: 1 addition & 1 deletion test/SIL/Parser/nonatomic_reference_counting.sil
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,6 @@ bb0(%0 : $C):
}

sil_vtable C {
#C.deinit!deallocator: _TFC28nonatomic_reference_counting1CD // C.__deallocating_deinit
#C.deinit!deallocator: @_TFC28nonatomic_reference_counting1CD // C.__deallocating_deinit
}

2 changes: 1 addition & 1 deletion test/SIL/Parser/stored_property.sil
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ bb0(%0 : $Rect):
// CHECK_LABEL: sil_vtable Rect
sil_vtable Rect {
// CHECK: #Rect.orgx!getter
#Rect.orgx!getter.1: _TFC4rect4Rectg4orgxSd
#Rect.orgx!getter.1: @_TFC4rect4Rectg4orgxSd
}
36 changes: 18 additions & 18 deletions test/SIL/Serialization/vtable.sil
Original file line number Diff line number Diff line change
Expand Up @@ -41,31 +41,31 @@ sil hidden_external [serialized] @_T01x7DerivedCACycfC : $@convention(method) (@
sil hidden_external [serialized] @_T01x7DerivedCACycfc : $@convention(method) (@owned Derived) -> @owned Derived

sil_vtable Base {
#Base.m1!1: (Base) -> () -> () : _T01x4BaseC2m1yyF
#Base.m2!1: (Base) -> () -> () : _T01x4BaseC2m2yyF
#Base.init!initializer.1: (Base.Type) -> () -> Base : _T01x4BaseCACycfc
#Base.deinit!deallocator: _T01x4BaseCfD
#Base.m1!1: (Base) -> () -> () : @_T01x4BaseC2m1yyF
#Base.m2!1: (Base) -> () -> () : @_T01x4BaseC2m2yyF
#Base.init!initializer.1: (Base.Type) -> () -> Base : @_T01x4BaseCACycfc
#Base.deinit!deallocator: @_T01x4BaseCfD
}

// CHECK-LABEL: sil_vtable Base {
// CHECK-NEXT: #Base.m1!1: (Base) -> () -> () : _T01x4BaseC2m1yyF
// CHECK-NEXT: #Base.m2!1: (Base) -> () -> () : _T01x4BaseC2m2yyF
// CHECK-NEXT: #Base.init!initializer.1: (Base.Type) -> () -> Base : _T01x4BaseCACycfc
// CHECK-NEXT: #Base.deinit!deallocator: _T01x4BaseCfD
// CHECK-NEXT: #Base.m1!1: (Base) -> () -> () : @_T01x4BaseC2m1yyF
// CHECK-NEXT: #Base.m2!1: (Base) -> () -> () : @_T01x4BaseC2m2yyF
// CHECK-NEXT: #Base.init!initializer.1: (Base.Type) -> () -> Base : @_T01x4BaseCACycfc
// CHECK-NEXT: #Base.deinit!deallocator: @_T01x4BaseCfD
// CHECK-NEXT: }

sil_vtable Derived {
#Base.m1!1: (Base) -> () -> () : _T01x4BaseC2m1yyF [inherited]
#Base.m2!1: (Base) -> () -> () : _T01x7DerivedC2m2yyF [override]
#Base.init!initializer.1: (Base.Type) -> () -> Base : _T01x7DerivedCACycfc [override]
#Derived.m3!1: (Derived) -> () -> () : _T01x7DerivedC2m3yyF
#Derived.deinit!deallocator: _T01x7DerivedCfD
#Base.m1!1: (Base) -> () -> () : @_T01x4BaseC2m1yyF [inherited]
#Base.m2!1: (Base) -> () -> () : @_T01x7DerivedC2m2yyF [override]
#Base.init!initializer.1: (Base.Type) -> () -> Base : @_T01x7DerivedCACycfc [override]
#Derived.m3!1: (Derived) -> () -> () : @_T01x7DerivedC2m3yyF
#Derived.deinit!deallocator: @_T01x7DerivedCfD
}

// CHECK-LABEL: sil_vtable Derived {
// CHECK-NEXT: #Base.m1!1: (Base) -> () -> () : _T01x4BaseC2m1yyF [inherited]
// CHECK-NEXT: #Base.m2!1: (Base) -> () -> () : _T01x7DerivedC2m2yyF [override]
// CHECK-NEXT: #Base.init!initializer.1: (Base.Type) -> () -> Base : _T01x7DerivedCACycfc [override]
// CHECK-NEXT: #Derived.m3!1: (Derived) -> () -> () : _T01x7DerivedC2m3yyF
// CHECK-NEXT: #Derived.deinit!deallocator: _T01x7DerivedCfD
// CHECK-NEXT: #Base.m1!1: (Base) -> () -> () : @_T01x4BaseC2m1yyF [inherited]
// CHECK-NEXT: #Base.m2!1: (Base) -> () -> () : @_T01x7DerivedC2m2yyF [override]
// CHECK-NEXT: #Base.init!initializer.1: (Base.Type) -> () -> Base : @_T01x7DerivedCACycfc [override]
// CHECK-NEXT: #Derived.m3!1: (Derived) -> () -> () : @_T01x7DerivedC2m3yyF
// CHECK-NEXT: #Derived.deinit!deallocator: @_T01x7DerivedCfD
// CHECK-NEXT: }
Loading