Merge pull request #72577 from jckarter/enable-borrowing-switch-backend

Use the `BorrowingSwitch` implementation for all noncopyable switches.
This commit is contained in:
Joe Groff
2024-04-10 07:38:12 -07:00
committed by GitHub
15 changed files with 216 additions and 900 deletions

View File

@@ -289,6 +289,10 @@ extension Instruction {
if bi.id == .OnFastPath {
return false
}
case is UncheckedEnumDataInst:
// Don't remove UncheckedEnumDataInst in OSSA in case it is responsible
// for consuming an enum value.
return !parentFunction.hasOwnership
default:
break
}