Skip to content

Commit 496c1d2

Browse files
committed
[SIL] Added SILType::isAggregate.
1 parent e2698ed commit 496c1d2

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

include/swift/SIL/SILType.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,13 @@ class SILType {
232232
return value.getPointer()->isVoid();
233233
}
234234

235+
/// Whether the type is an enum, struct, or tuple.
236+
bool isAggregate() {
237+
return is<TupleType>() || is<StructType>() ||
238+
is<BoundGenericStructType>() || is<EnumType>() ||
239+
is<BoundGenericEnumType>();
240+
}
241+
235242
/// Retrieve the ClassDecl for a type that maps to a Swift class or
236243
/// bound generic class type.
237244
ClassDecl *getClassOrBoundGenericClass() const {

0 commit comments

Comments
 (0)