Skip to content

Commit bcf2f8b

Browse files
committed
[SILType] Added has[..]Pack conveniences.
1 parent 6c1642f commit bcf2f8b

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

include/swift/SIL/SILType.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,16 @@ class SILType {
348348
/// An efficient implementation of `!isTrivial() && isOrContainsRawPointer()`.
349349
bool isNonTrivialOrContainsRawPointer(const SILFunction *f) const;
350350

351+
/// Whether the type contains a generic parameter declared as a parameter
352+
/// pack.
353+
bool hasParameterPack() const { return getASTType()->hasParameterPack(); }
354+
355+
/// Whether the type contains a concrete pack.
356+
bool hasConcretePack() const { return getASTType()->hasConcretePack(); }
357+
358+
/// Whether the type contains some flavor of pack.
359+
bool hasPack() const { return getASTType()->hasPack(); }
360+
351361
/// True if the type is an empty tuple or an empty struct or a tuple or
352362
/// struct containing only empty types.
353363
bool isEmpty(const SILFunction &F) const;

0 commit comments

Comments
 (0)