Skip to content

Commit 0d11ea0

Browse files
committed
Rename selector family symbols in SILFunctionType
Matches the new type name, ObjCSelectorFamily.
1 parent 31aeb64 commit 0d11ea0

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

lib/SIL/SILFunctionType.cpp

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ enum class ConventionsKind : uint8_t {
220220
ObjCMethod = 2,
221221
CFunctionType = 3,
222222
CFunction = 4,
223-
SelectorFamily = 5,
223+
ObjCSelectorFamily = 5,
224224
Deallocator = 6,
225225
Capture = 7,
226226
};
@@ -1714,7 +1714,7 @@ static const clang::Decl *findClangMethod(ValueDecl *method) {
17141714
/// Note that this will never derive the Init family, which is too dangerous
17151715
/// to leave to chance. Swift functions starting with "init" are always
17161716
/// emitted as if they are part of the "none" family.
1717-
static ObjCSelectorFamily getSelectorFamily(ObjCSelector name) {
1717+
static ObjCSelectorFamily getObjCSelectorFamily(ObjCSelector name) {
17181718
auto result = name.getSelectorFamily();
17191719

17201720
if (result == ObjCSelectorFamily::Init)
@@ -1724,7 +1724,7 @@ static ObjCSelectorFamily getSelectorFamily(ObjCSelector name) {
17241724
}
17251725

17261726
/// Get the ObjC selector family a foreign SILDeclRef belongs to.
1727-
static ObjCSelectorFamily getSelectorFamily(SILDeclRef c) {
1727+
static ObjCSelectorFamily getObjCSelectorFamily(SILDeclRef c) {
17281728
assert(c.isForeign);
17291729
switch (c.kind) {
17301730
case SILDeclRef::Kind::Func: {
@@ -1745,7 +1745,7 @@ static ObjCSelectorFamily getSelectorFamily(SILDeclRef c) {
17451745
}
17461746
}
17471747

1748-
return getSelectorFamily(FD->getObjCSelector());
1748+
return getObjCSelectorFamily(FD->getObjCSelector());
17491749
}
17501750
case SILDeclRef::Kind::Initializer:
17511751
case SILDeclRef::Kind::IVarInitializer:
@@ -1772,12 +1772,12 @@ static ObjCSelectorFamily getSelectorFamily(SILDeclRef c) {
17721772

17731773
namespace {
17741774

1775-
class SelectorFamilyConventions : public Conventions {
1775+
class ObjCSelectorFamilyConventions : public Conventions {
17761776
ObjCSelectorFamily Family;
17771777

17781778
public:
1779-
SelectorFamilyConventions(ObjCSelectorFamily family)
1780-
: Conventions(ConventionsKind::SelectorFamily), Family(family) {}
1779+
ObjCSelectorFamilyConventions(ObjCSelectorFamily family)
1780+
: Conventions(ConventionsKind::ObjCSelectorFamily), Family(family) {}
17811781

17821782
ParameterConvention getIndirectParameter(unsigned index,
17831783
const AbstractionPattern &type,
@@ -1834,21 +1834,21 @@ class SelectorFamilyConventions : public Conventions {
18341834
}
18351835

18361836
static bool classof(const Conventions *C) {
1837-
return C->getKind() == ConventionsKind::SelectorFamily;
1837+
return C->getKind() == ConventionsKind::ObjCSelectorFamily;
18381838
}
18391839
};
18401840

18411841
} // end anonymous namespace
18421842

18431843
static CanSILFunctionType
1844-
getSILFunctionTypeForSelectorFamily(SILModule &M, ObjCSelectorFamily family,
1845-
CanAnyFunctionType origType,
1846-
CanAnyFunctionType substInterfaceType,
1847-
AnyFunctionType::ExtInfo extInfo,
1848-
const ForeignInfo &foreignInfo,
1849-
Optional<SILDeclRef> constant) {
1844+
getSILFunctionTypeForObjCSelectorFamily(SILModule &M, ObjCSelectorFamily family,
1845+
CanAnyFunctionType origType,
1846+
CanAnyFunctionType substInterfaceType,
1847+
AnyFunctionType::ExtInfo extInfo,
1848+
const ForeignInfo &foreignInfo,
1849+
Optional<SILDeclRef> constant) {
18501850
return getSILFunctionType(M, AbstractionPattern(origType), substInterfaceType,
1851-
extInfo, SelectorFamilyConventions(family),
1851+
extInfo, ObjCSelectorFamilyConventions(family),
18521852
foreignInfo, constant, constant,
18531853
/*requirement subs*/None,
18541854
/*witnessMethodConformance=*/None);
@@ -1929,10 +1929,10 @@ getUncachedSILFunctionTypeForConstant(SILModule &M,
19291929

19301930
// If the decl belongs to an ObjC method family, use that family's
19311931
// ownership conventions.
1932-
return getSILFunctionTypeForSelectorFamily(M, getSelectorFamily(constant),
1933-
origLoweredInterfaceType,
1934-
origLoweredInterfaceType,
1935-
extInfo, foreignInfo, constant);
1932+
return getSILFunctionTypeForObjCSelectorFamily(
1933+
M, getObjCSelectorFamily(constant),
1934+
origLoweredInterfaceType, origLoweredInterfaceType,
1935+
extInfo, foreignInfo, constant);
19361936
}
19371937

19381938
CanSILFunctionType TypeConverter::

0 commit comments

Comments
 (0)