Skip to content

Commit a1b75ca

Browse files
committed
SIL: Remove unused getSemanticType{,Lowering}()
1 parent 5b3056c commit a1b75ca

File tree

1 file changed

+0
-26
lines changed

1 file changed

+0
-26
lines changed

include/swift/SIL/TypeLowering.h

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -306,23 +306,6 @@ class TypeLowering {
306306
return Properties.isResilient();
307307
}
308308

309-
/// Return the semantic type.
310-
///
311-
/// The semantic type is what a type pretends to be during
312-
/// type-checking: that is, the type that getTypeOfRValue would
313-
/// return on a variable of this type.
314-
SILType getSemanticType() const {
315-
// If you change this, change getSemanticTypeLowering() too.
316-
auto storageType = getLoweredType().getASTType();
317-
if (auto refType = dyn_cast<ReferenceStorageType>(storageType))
318-
return SILType::getPrimitiveType(refType.getReferentType(),
319-
SILValueCategory::Object);
320-
return getLoweredType();
321-
}
322-
323-
/// Return the lowering for the semantic type.
324-
inline const TypeLowering &getSemanticTypeLowering(TypeConverter &TC) const;
325-
326309
/// Produce an exact copy of the value in the given address as a
327310
/// scalar. The caller is responsible for destroying this value,
328311
/// e.g. by releasing it.
@@ -1033,15 +1016,6 @@ class TypeConverter {
10331016
bool suppressOptional);
10341017
};
10351018

1036-
inline const TypeLowering &
1037-
TypeLowering::getSemanticTypeLowering(TypeConverter &TC) const {
1038-
// If you change this, change getSemanticType() too.
1039-
auto storageType = getLoweredType().getASTType();
1040-
if (auto refType = dyn_cast<ReferenceStorageType>(storageType))
1041-
return TC.getTypeLowering(refType.getReferentType());
1042-
return *this;
1043-
}
1044-
10451019
/// RAII interface to push a generic context.
10461020
class GenericContextScope {
10471021
TypeConverter &TC;

0 commit comments

Comments
 (0)