mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Re-commit r13836 with more correctness this time:
Sink the getObjCGetterSelector/Setter methods from VarDecl/SubscriptDecl down to AbstractStorageDecl. NFC. Swift SVN r13842
This commit is contained in:
@@ -311,20 +311,12 @@ namespace {
|
||||
}
|
||||
}
|
||||
|
||||
Selector(VarDecl *property, ForGetter_t) {
|
||||
property->getObjCGetterSelector(Text);
|
||||
Selector(AbstractStorageDecl *asd, ForGetter_t) {
|
||||
asd->getObjCGetterSelector(Text);
|
||||
}
|
||||
|
||||
Selector(VarDecl *property, ForSetter_t) {
|
||||
property->getObjCSetterSelector(Text);
|
||||
}
|
||||
|
||||
Selector(SubscriptDecl *subscript, ForGetter_t) {
|
||||
Text = subscript->getObjCGetterSelector();
|
||||
}
|
||||
|
||||
Selector(SubscriptDecl *subscript, ForSetter_t) {
|
||||
Text = subscript->getObjCSetterSelector();
|
||||
Selector(AbstractStorageDecl *asd, ForSetter_t) {
|
||||
asd->getObjCSetterSelector(Text);
|
||||
}
|
||||
|
||||
Selector(SILDeclRef ref) {
|
||||
@@ -345,10 +337,7 @@ namespace {
|
||||
break;
|
||||
|
||||
case SILDeclRef::Kind::Getter:
|
||||
if (auto var = dyn_cast<VarDecl>(ref.getDecl()))
|
||||
var->getObjCGetterSelector(Text);
|
||||
else
|
||||
Text = cast<SubscriptDecl>(ref.getDecl())->getObjCGetterSelector();
|
||||
cast<AbstractStorageDecl>(ref.getDecl())->getObjCGetterSelector(Text);
|
||||
break;
|
||||
|
||||
case SILDeclRef::Kind::Initializer:
|
||||
@@ -364,10 +353,7 @@ namespace {
|
||||
break;
|
||||
|
||||
case SILDeclRef::Kind::Setter:
|
||||
if (auto var = dyn_cast<VarDecl>(ref.getDecl()))
|
||||
var->getObjCSetterSelector(Text);
|
||||
else
|
||||
Text = cast<SubscriptDecl>(ref.getDecl())->getObjCSetterSelector();
|
||||
cast<AbstractStorageDecl>(ref.getDecl())->getObjCSetterSelector(Text);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user