Skip to content

Commit 53d82f7

Browse files
committed
AST: Remove SubscriptDecl::getIndicesInterfaceType()
1 parent d9bd0d9 commit 53d82f7

File tree

4 files changed

+0
-21
lines changed

4 files changed

+0
-21
lines changed

include/swift/AST/Decl.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4870,9 +4870,6 @@ class SubscriptDecl : public GenericContext, public AbstractStorageDecl {
48704870
const ParameterList *getIndices() const { return Indices; }
48714871
void setIndices(ParameterList *p);
48724872

4873-
/// Retrieve the interface type of the indices.
4874-
Type getIndicesInterfaceType() const;
4875-
48764873
/// \brief Retrieve the type of the element referenced by a subscript
48774874
/// operation.
48784875
Type getElementInterfaceType() const;

include/swift/SIL/TypeLowering.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -802,7 +802,6 @@ class TypeConverter {
802802
bool isNonObjC = false);
803803
AbstractionPattern getAbstractionPattern(SubscriptDecl *subscript,
804804
bool isNonObjC = false);
805-
AbstractionPattern getIndicesAbstractionPattern(SubscriptDecl *subscript);
806805
AbstractionPattern getAbstractionPattern(EnumElementDecl *element);
807806

808807
SILType getLoweredTypeOfGlobal(VarDecl *var);

lib/AST/Decl.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4913,13 +4913,6 @@ void SubscriptDecl::setIndices(ParameterList *p) {
49134913
Indices->setDeclContextOfParamDecls(this);
49144914
}
49154915

4916-
Type SubscriptDecl::getIndicesInterfaceType() const {
4917-
auto indicesTy = getInterfaceType();
4918-
if (indicesTy->is<ErrorType>())
4919-
return indicesTy;
4920-
return indicesTy->castTo<AnyFunctionType>()->getInput();
4921-
}
4922-
49234916
Type SubscriptDecl::getElementInterfaceType() const {
49244917
auto elementTy = getInterfaceType();
49254918
if (elementTy->is<ErrorType>())

lib/SIL/AbstractionPattern.cpp

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -51,16 +51,6 @@ TypeConverter::getAbstractionPattern(SubscriptDecl *decl, bool isNonObjC) {
5151
->getCanonicalType());
5252
}
5353

54-
AbstractionPattern
55-
TypeConverter::getIndicesAbstractionPattern(SubscriptDecl *decl) {
56-
CanGenericSignature genericSig;
57-
if (auto sig = decl->getGenericSignatureOfContext())
58-
genericSig = sig->getCanonicalSignature();
59-
auto indicesTy = decl->getIndicesInterfaceType();
60-
auto indicesCanTy = indicesTy->getCanonicalType(genericSig);
61-
return AbstractionPattern(genericSig, indicesCanTy);
62-
}
63-
6454
static const clang::Type *getClangType(const clang::Decl *decl) {
6555
if (auto valueDecl = dyn_cast<clang::ValueDecl>(decl)) {
6656
return valueDecl->getType().getTypePtr();

0 commit comments

Comments
 (0)