Skip to content

Commit 35e67db

Browse files
committed
SIL: Rename some methods in TypeLowering.cpp
1 parent 5ec8f96 commit 35e67db

File tree

2 files changed

+20
-17
lines changed

2 files changed

+20
-17
lines changed

include/swift/SIL/TypeLowering.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1001,7 +1001,8 @@ class TypeConverter {
10011001
EnumElementDecl *elt);
10021002

10031003
private:
1004-
CanType getLoweredRValueType(AbstractionPattern origType, CanType substType);
1004+
CanType computeLoweredRValueType(AbstractionPattern origType,
1005+
CanType substType);
10051006

10061007
Type getLoweredCBridgedType(AbstractionPattern pattern, Type t,
10071008
Bridgeability bridging,

lib/SIL/TypeLowering.cpp

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1343,9 +1343,9 @@ void TypeConverter::insert(TypeKey k, const TypeLowering *tl) {
13431343

13441344
/// Lower each of the elements of the substituted type according to
13451345
/// the abstraction pattern of the given original type.
1346-
static CanTupleType getLoweredTupleType(TypeConverter &tc,
1347-
AbstractionPattern origType,
1348-
CanTupleType substType) {
1346+
static CanTupleType computeLoweredTupleType(TypeConverter &tc,
1347+
AbstractionPattern origType,
1348+
CanTupleType substType) {
13491349
assert(origType.matchesTuple(substType));
13501350

13511351
// Does the lowered tuple type differ from the substituted type in
@@ -1388,10 +1388,10 @@ static CanTupleType getLoweredTupleType(TypeConverter &tc,
13881388
return cast<TupleType>(CanType(TupleType::get(loweredElts, tc.Context)));
13891389
}
13901390

1391-
static CanType getLoweredOptionalType(TypeConverter &tc,
1392-
AbstractionPattern origType,
1393-
CanType substType,
1394-
CanType substObjectType) {
1391+
static CanType computeLoweredOptionalType(TypeConverter &tc,
1392+
AbstractionPattern origType,
1393+
CanType substType,
1394+
CanType substObjectType) {
13951395
assert(substType.getOptionalObjectType() == substObjectType);
13961396

13971397
CanType loweredObjectType =
@@ -1407,9 +1407,10 @@ static CanType getLoweredOptionalType(TypeConverter &tc,
14071407
return CanType(BoundGenericEnumType::get(optDecl, Type(), loweredObjectType));
14081408
}
14091409

1410-
static CanType getLoweredReferenceStorageType(TypeConverter &tc,
1411-
AbstractionPattern origType,
1412-
CanReferenceStorageType substType) {
1410+
static CanType
1411+
computeLoweredReferenceStorageType(TypeConverter &tc,
1412+
AbstractionPattern origType,
1413+
CanReferenceStorageType substType) {
14131414
CanType loweredReferentType =
14141415
tc.getLoweredType(origType.getReferenceStorageReferentType(),
14151416
substType.getReferentType())
@@ -1445,7 +1446,7 @@ TypeConverter::getTypeLowering(AbstractionPattern origType,
14451446

14461447
// Lower the type.
14471448
CanType loweredSubstType =
1448-
getLoweredRValueType(origType, substType);
1449+
computeLoweredRValueType(origType, substType);
14491450

14501451
// If that didn't change the type and the key is cacheable, there's no
14511452
// point in re-checking the table, so just construct a type lowering
@@ -1467,8 +1468,8 @@ TypeConverter::getTypeLowering(AbstractionPattern origType,
14671468
return lowering;
14681469
}
14691470

1470-
CanType TypeConverter::getLoweredRValueType(AbstractionPattern origType,
1471-
CanType substType) {
1471+
CanType TypeConverter::computeLoweredRValueType(AbstractionPattern origType,
1472+
CanType substType) {
14721473
assert(!substType->hasError() &&
14731474
"Error types should not appear in type-checked AST");
14741475

@@ -1559,17 +1560,18 @@ CanType TypeConverter::getLoweredRValueType(AbstractionPattern origType,
15591560

15601561
// Lower tuple element types.
15611562
if (auto substTupleType = dyn_cast<TupleType>(substType)) {
1562-
return getLoweredTupleType(*this, origType, substTupleType);
1563+
return computeLoweredTupleType(*this, origType, substTupleType);
15631564
}
15641565

15651566
// Lower the referent type of reference storage types.
15661567
if (auto substRefType = dyn_cast<ReferenceStorageType>(substType)) {
1567-
return getLoweredReferenceStorageType(*this, origType, substRefType);
1568+
return computeLoweredReferenceStorageType(*this, origType, substRefType);
15681569
}
15691570

15701571
// Lower the object type of optional types.
15711572
if (auto substObjectType = substType.getOptionalObjectType()) {
1572-
return getLoweredOptionalType(*this, origType, substType, substObjectType);
1573+
return computeLoweredOptionalType(*this, origType,
1574+
substType, substObjectType);
15731575
}
15741576

15751577
// The Swift type directly corresponds to the lowered type.

0 commit comments

Comments
 (0)