mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[NFC] Add a method to just ask if a tuple AP vanishes under substitution
This commit is contained in:
@@ -1354,6 +1354,10 @@ public:
|
||||
llvm::Optional<AbstractionPattern>
|
||||
getVanishingTupleElementPatternType() const;
|
||||
|
||||
/// Does this tuple type vanish, i.e. is it flattened to a singleton
|
||||
/// non-expansion element under substitution?
|
||||
bool doesTupleVanish() const;
|
||||
|
||||
static AbstractionPattern
|
||||
projectTupleElementType(const AbstractionPattern *base, size_t index) {
|
||||
return base->getTupleElementType(index);
|
||||
|
||||
@@ -224,6 +224,11 @@ public:
|
||||
return origEltIndex == numOrigElts;
|
||||
}
|
||||
|
||||
/// Does the entire original tuple vanish?
|
||||
bool doesOrigTupleVanish() const {
|
||||
return origTupleVanishes;
|
||||
}
|
||||
|
||||
/// Advance to the next orig element.
|
||||
void advance() {
|
||||
assert(!isFinished());
|
||||
|
||||
Reference in New Issue
Block a user