mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
SIL: SILUndef must be aware of the resilience expansion
The ownership kind is Any for trivial types, or Owned otherwise, but whether a type is trivial or not will soon depend on the resilience expansion. This means that a SILModule now uniques two SILUndefs per type instead of one, and serialization uses two distinct sentinel IDs for this purpose as well. For now, the resilience expansion is not actually used here, so this change is NFC, other than changing the module format.
This commit is contained in:
@@ -259,7 +259,7 @@ bool ConditionForwarding::tryOptimize(SwitchEnumInst *SEI) {
|
||||
assert(ArgUser == SEI);
|
||||
// We delete the SEI later anyway. Just get rid of the Arg use.
|
||||
ArgUse->set(SILUndef::get(SEI->getOperand()->getType(),
|
||||
getFunction()->getModule()));
|
||||
*getFunction()));
|
||||
}
|
||||
|
||||
// Redirect the predecessors of the condition's merging block to the
|
||||
|
||||
Reference in New Issue
Block a user