diff --git a/include/swift/SIL/AbstractionPattern.h b/include/swift/SIL/AbstractionPattern.h index ab9d649b505..9b342089705 100644 --- a/include/swift/SIL/AbstractionPattern.h +++ b/include/swift/SIL/AbstractionPattern.h @@ -996,10 +996,6 @@ public: /// the abstraction pattern for its object type. AbstractionPattern getTupleElementType(unsigned index) const; - /// Given that the value being abstracted is an l-value or inout type, - /// return the abstraction pattern for its object type. - AbstractionPattern getWithoutSpecifierType() const; - /// Given that the value being abstracted is a function, return the /// abstraction pattern for its result type. AbstractionPattern getFunctionResultType() const; diff --git a/lib/SIL/AbstractionPattern.cpp b/lib/SIL/AbstractionPattern.cpp index 58af773c902..c5520a08d45 100644 --- a/lib/SIL/AbstractionPattern.cpp +++ b/lib/SIL/AbstractionPattern.cpp @@ -499,39 +499,6 @@ AbstractionPattern::getObjCMethodFormalParamPattern(CanType inputType) const { method->parameters()[paramIndex]->getType().getTypePtr()); } -AbstractionPattern AbstractionPattern::getWithoutSpecifierType() const { - switch (getKind()) { - case Kind::Invalid: - llvm_unreachable("querying invalid abstraction pattern!"); - case Kind::Tuple: - case Kind::ClangFunctionParamTupleType: - case Kind::PartialCurriedObjCMethodType: - case Kind::CurriedObjCMethodType: - case Kind::CFunctionAsMethodType: - case Kind::CFunctionAsMethodParamTupleType: - case Kind::CurriedCFunctionAsMethodType: - case Kind::PartialCurriedCFunctionAsMethodType: - case Kind::ObjCMethodType: - case Kind::ObjCMethodParamTupleType: - case Kind::ObjCMethodFormalParamTupleType: - case Kind::CFunctionAsMethodFormalParamTupleType: - llvm_unreachable("abstraction pattern for lvalue cannot be tuple"); - case Kind::Opaque: - return *this; - case Kind::Type: - return AbstractionPattern(getGenericSignature(), - getType().getWithoutSpecifierType()); - case Kind::Discard: - return AbstractionPattern::getDiscard(getGenericSignature(), - getType().getWithoutSpecifierType()); - case Kind::ClangType: - return AbstractionPattern(getGenericSignature(), - getType().getWithoutSpecifierType(), - getClangType()); - } - llvm_unreachable("bad kind"); -} - static CanType getResultType(CanType type) { return cast(type).getResult(); }