Skip to content

Commit c99c0c5

Browse files
committed
SIL: Remove AbstractionPattern::getWithoutSpecifierType()
1 parent 69cd7b3 commit c99c0c5

File tree

2 files changed

+0
-37
lines changed

2 files changed

+0
-37
lines changed

include/swift/SIL/AbstractionPattern.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -996,10 +996,6 @@ class AbstractionPattern {
996996
/// the abstraction pattern for its object type.
997997
AbstractionPattern getTupleElementType(unsigned index) const;
998998

999-
/// Given that the value being abstracted is an l-value or inout type,
1000-
/// return the abstraction pattern for its object type.
1001-
AbstractionPattern getWithoutSpecifierType() const;
1002-
1003999
/// Given that the value being abstracted is a function, return the
10041000
/// abstraction pattern for its result type.
10051001
AbstractionPattern getFunctionResultType() const;

lib/SIL/AbstractionPattern.cpp

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -499,39 +499,6 @@ AbstractionPattern::getObjCMethodFormalParamPattern(CanType inputType) const {
499499
method->parameters()[paramIndex]->getType().getTypePtr());
500500
}
501501

502-
AbstractionPattern AbstractionPattern::getWithoutSpecifierType() const {
503-
switch (getKind()) {
504-
case Kind::Invalid:
505-
llvm_unreachable("querying invalid abstraction pattern!");
506-
case Kind::Tuple:
507-
case Kind::ClangFunctionParamTupleType:
508-
case Kind::PartialCurriedObjCMethodType:
509-
case Kind::CurriedObjCMethodType:
510-
case Kind::CFunctionAsMethodType:
511-
case Kind::CFunctionAsMethodParamTupleType:
512-
case Kind::CurriedCFunctionAsMethodType:
513-
case Kind::PartialCurriedCFunctionAsMethodType:
514-
case Kind::ObjCMethodType:
515-
case Kind::ObjCMethodParamTupleType:
516-
case Kind::ObjCMethodFormalParamTupleType:
517-
case Kind::CFunctionAsMethodFormalParamTupleType:
518-
llvm_unreachable("abstraction pattern for lvalue cannot be tuple");
519-
case Kind::Opaque:
520-
return *this;
521-
case Kind::Type:
522-
return AbstractionPattern(getGenericSignature(),
523-
getType().getWithoutSpecifierType());
524-
case Kind::Discard:
525-
return AbstractionPattern::getDiscard(getGenericSignature(),
526-
getType().getWithoutSpecifierType());
527-
case Kind::ClangType:
528-
return AbstractionPattern(getGenericSignature(),
529-
getType().getWithoutSpecifierType(),
530-
getClangType());
531-
}
532-
llvm_unreachable("bad kind");
533-
}
534-
535502
static CanType getResultType(CanType type) {
536503
return cast<AnyFunctionType>(type).getResult();
537504
}

0 commit comments

Comments
 (0)