Skip to content

Commit 282b7e3

Browse files
committed
SIL: Add missing SILType::has*Archetype() predicates
1 parent b8ea2d6 commit 282b7e3

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

include/swift/SIL/SILType.h

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ class SILType {
461461
}
462462

463463
/// Returns true if the referenced type is expressed in terms of one
464-
/// or more opened existential types.
464+
/// or more opened existential archetypes.
465465
bool hasOpenedExistential() const {
466466
return getASTType()->hasOpenedExistential();
467467
}
@@ -470,6 +470,12 @@ class SILType {
470470
return getASTType()->canBeClass();
471471
}
472472

473+
/// Returns true if the referenced type is expressed in terms of one
474+
/// or more element archetypes.
475+
bool hasElementArchetype() const {
476+
return getASTType()->hasElementArchetype();
477+
}
478+
473479
/// Returns true if the referenced type is expressed in terms of one
474480
/// or more local archetypes.
475481
bool hasLocalArchetype() const {
@@ -557,9 +563,14 @@ class SILType {
557563
return false;
558564
}
559565

560-
/// True if the type involves any archetypes.
566+
/// True if the type involves any primary or local archetypes.
561567
bool hasArchetype() const { return getASTType()->hasArchetype(); }
562568

569+
/// True if the type involves any primary archetypes.
570+
bool hasPrimaryArchetype() const {
571+
return getASTType()->hasPrimaryArchetype();
572+
}
573+
563574
/// True if the type involves any opaque archetypes.
564575
bool hasOpaqueArchetype() const {
565576
return getASTType()->hasOpaqueArchetype();

0 commit comments

Comments
 (0)