Skip to content

Commit 0e23eef

Browse files
committed
[SILType] Added has[..]Pack conveniences.
1 parent 2866ad4 commit 0e23eef

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
@@ -373,6 +373,16 @@ class SILType {
373373
/// An efficient implementation of `!isTrivial() && isOrContainsRawPointer()`.
374374
bool isNonTrivialOrContainsRawPointer(const SILFunction *f) const;
375375

376+
/// Whether the type contains a generic parameter declared as a parameter
377+
/// pack.
378+
bool hasParameterPack() const { return getASTType()->hasParameterPack(); }
379+
380+
/// Whether the type contains a concrete pack.
381+
bool hasConcretePack() const { return getASTType()->hasConcretePack(); }
382+
383+
/// Whether the type contains some flavor of pack.
384+
bool hasPack() const { return getASTType()->hasPack(); }
385+
376386
/// True if the type is an empty tuple or an empty struct or a tuple or
377387
/// struct containing only empty types.
378388
bool isEmpty(const SILFunction &F) const;

0 commit comments

Comments
 (0)