Skip to content

Commit b384f5e

Browse files
committed
Provide isAnyClassReferenceType() on SILType.
1 parent 510f29a commit b384f5e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

include/swift/SIL/SILType.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,12 @@ class SILType {
290290
bool hasReferenceSemantics() const {
291291
return getSwiftRValueType().hasReferenceSemantics();
292292
}
293+
294+
/// Returns true if the referenced type is any sort of class-reference type,
295+
/// meaning anything with reference semantics that is not a function type.
296+
bool isAnyClassReferenceType() const {
297+
return getSwiftRValueType().isAnyClassReferenceType();
298+
}
293299

294300
/// Returns true if the referenced type is guaranteed to have a
295301
/// single-retainable-pointer representation.

0 commit comments

Comments
 (0)