From 9b2a7efbf23d6ec978b33bbb7bb5135f19441ff6 Mon Sep 17 00:00:00 2001 From: Anthony Latsis Date: Thu, 11 Dec 2025 00:28:08 +0000 Subject: [PATCH] SIL: Adjust pack `isa` after upstream LLVM implementation change See https://github.com/llvm/llvm-project/pull/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`. --- lib/SIL/IR/SILType.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/lib/SIL/IR/SILType.cpp b/lib/SIL/IR/SILType.cpp index 6f44758b275ad..d25b1e21dc287 100644 --- a/lib/SIL/IR/SILType.cpp +++ b/lib/SIL/IR/SILType.cpp @@ -1119,10 +1119,8 @@ bool SILType::isEscapable(const SILFunction &function) const { // TODO: Support ~Escapable in parameter packs. // // Treat all other SIL-specific types as Escapable. - if (isa(ty)) { + if (isa(ty) || isa(ty) || + isa(ty) || isa(ty)) { return true; } return ty->isEscapable(); @@ -1157,10 +1155,8 @@ bool SILType::isMoveOnly(bool orWrapped) const { return false; // Treat all other SIL-specific types as Copyable. - if (isa(ty)) { + if (isa(ty) || isa(ty) || + isa(ty) || isa(ty)) { return false; }