SIL: remove a workaround for a Windows 5.10 host compiler crash

https://github.com/apple/swift/issues/73253 should be fixed in 6.0, which is now used as host compiler.
This commit is contained in:
Erik Eckstein
2025-03-14 09:47:22 +01:00
parent 37455b6ab6
commit d31d82c6fe
2 changed files with 4 additions and 13 deletions

View File

@@ -28,10 +28,6 @@ private extension ConvertEscapeToNoEscapeInst {
/// %3 = thin_to_thick_function %1 to $@noescape () -> ()
func tryCombineWithThinToThickOperand(_ context: SimplifyContext) {
// compiling bridged.getFunctionTypeWithNoEscape crashes the 5.10 Windows compiler
#if !os(Windows)
// TODO: https://github.com/apple/swift/issues/73253
if let thinToThick = fromFunction as? ThinToThickFunctionInst {
let builder = Builder(before: self, context)
let noEscapeFnType = thinToThick.type.getFunctionType(withNoEscape: true)
@@ -40,6 +36,5 @@ private extension ConvertEscapeToNoEscapeInst {
uses.replaceAll(with: newThinToThick, context)
context.erase(instruction: self)
}
#endif
}
}

View File

@@ -99,14 +99,10 @@ public struct Type : TypeProperties, CustomStringConvertible, NoReflectionChildr
GenericSignature(bridged: bridged.getInvocationGenericSignatureOfFunctionType())
}
// compiling bridged.getFunctionTypeWithNoEscape crashes the 5.10 Windows compiler
// TODO: https://github.com/apple/swift/issues/73253
#if !os(Windows)
// Returns a new SILFunctionType with changed "escapeness".
public func getFunctionType(withNoEscape: Bool) -> Type {
bridged.getFunctionTypeWithNoEscape(withNoEscape).type
}
#endif
// Returns a new SILFunctionType with changed "escapeness".
public func getFunctionType(withNoEscape: Bool) -> Type {
bridged.getFunctionTypeWithNoEscape(withNoEscape).type
}
//===--------------------------------------------------------------------===//
// Aggregates