Skip to content

Commit ee7753c

Browse files
committed
[sil] Make SILType::getCategoryType() use getRawASTType() instead of getASTType().
The reason why this makes sense is that this method is attempting to return the current SILType but with a different category. So using getASTType() here and by mistake removing move only would break semantics. Additionally, not making this change breaks the expectation that this API would be idempotent.
1 parent 4a8ee40 commit ee7753c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/swift/SIL/SILType.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ class SILType {
151151

152152
/// Returns the \p Category variant of this type.
153153
SILType getCategoryType(SILValueCategory Category) const {
154-
return SILType(getASTType(), Category);
154+
return SILType(getRawASTType(), Category);
155155
}
156156

157157
/// Returns the variant of this type that matches \p Ty.getCategory()

0 commit comments

Comments
 (0)