Handle return_borrow in a few more places in SwiftCompilerSources

This commit is contained in:
Meghana Gupta
2025-10-28 05:10:57 -07:00
parent e39a31a05f
commit a0eb58fa07
12 changed files with 51 additions and 21 deletions

View File

@@ -682,7 +682,7 @@ private struct PackExplodedFunction {
if resultMap.contains(where: {
$0.expandedElements.contains(where: { !$0.isSILIndirect })
}) {
if let originalReturnStatement = specialized.returnInstruction {
if let originalReturnStatement = specialized.returnInstruction as? ReturnInst {
self.createExplodedReturn(
replacing: originalReturnStatement, argumentMap: argumentMap, specContext)
}