Skip to content

Commit fe094c6

Browse files
committed
SIL: Add TypeLowering::getLoweredRValueType()
In various places we want to get a lowered type, but ignoring the SIL type category (object or address). Add a pair of utility methods for this purpose.
1 parent 35e67db commit fe094c6

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

include/swift/SIL/TypeLowering.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -792,6 +792,14 @@ class TypeConverter {
792792
return ti.getLoweredType();
793793
}
794794

795+
CanType getLoweredRValueType(Type t) {
796+
return getLoweredType(t).getASTType();
797+
}
798+
799+
CanType getLoweredRValueType(AbstractionPattern origType, Type substType) {
800+
return getLoweredType(origType, substType).getASTType();
801+
}
802+
795803
AbstractionPattern getAbstractionPattern(AbstractStorageDecl *storage,
796804
bool isNonObjC = false);
797805
AbstractionPattern getAbstractionPattern(VarDecl *var,

0 commit comments

Comments
 (0)