Skip to content

Commit d6e32df

Browse files
committed
SIL: Adjust pack isa after upstream LLVM implementation change
See llvm/llvm-project#161403. These `isa` calls with a `CanType` no longer compile with LLVM next because the implementation now unfolds directly to `CastInfo` calls rather than non-variadic `isa` calls that resolve to our partial specializations here: https://github.com/swiftlang/swift/blob/e293876e4f3e376b29cdb225962e1f76cfcfbed7/include/swift/AST/Type.h#L600 We should partially specialize `CastInfo` instead of `isa` et al. For now, just use the non-variadic `isa`.
1 parent da8b721 commit d6e32df

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

lib/SIL/IR/SILType.cpp

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1119,11 +1119,9 @@ bool SILType::isEscapable(const SILFunction &function) const {
11191119
// TODO: Support ~Escapable in parameter packs.
11201120
//
11211121
// Treat all other SIL-specific types as Escapable.
1122-
if (isa<SILBlockStorageType,
1123-
SILBoxType,
1124-
SILPackType,
1125-
SILTokenType>(ty)) {
1126-
return true;
1122+
if (isa<SILBlockStorageType>(ty) || isa<SILBoxType>(ty) ||
1123+
isa<SILPackType>(ty) || isa<SILTokenType>(ty)) {
1124+
return false;
11271125
}
11281126
return ty->isEscapable();
11291127
}
@@ -1157,10 +1155,8 @@ bool SILType::isMoveOnly(bool orWrapped) const {
11571155
return false;
11581156

11591157
// Treat all other SIL-specific types as Copyable.
1160-
if (isa<SILBlockStorageType,
1161-
SILBoxType,
1162-
SILPackType,
1163-
SILTokenType>(ty)) {
1158+
if (isa<SILBlockStorageType>(ty) || isa<SILBoxType>(ty) ||
1159+
isa<SILPackType>(ty) || isa<SILTokenType>(ty)) {
11641160
return false;
11651161
}
11661162

0 commit comments

Comments
 (0)