mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Rename OwnershipForwardingMixin -> ForwardingInstruction
This commit is contained in:
@@ -526,7 +526,7 @@ eliminateUnneededForwardingUnarySingleValueInst(SingleValueInstruction *inst,
|
||||
static Optional<SILBasicBlock::iterator>
|
||||
tryEliminateUnneededForwardingInst(SILInstruction *i,
|
||||
CanonicalizeInstruction &pass) {
|
||||
assert(OwnershipForwardingMixin::isa(i) &&
|
||||
assert(ForwardingInstruction::isa(i) &&
|
||||
"Must be an ownership forwarding inst");
|
||||
if (auto *svi = dyn_cast<SingleValueInstruction>(i))
|
||||
if (svi->getNumOperands() == 1)
|
||||
@@ -565,7 +565,7 @@ CanonicalizeInstruction::canonicalize(SILInstruction *inst) {
|
||||
auto *fn = inst->getFunction();
|
||||
if (!preserveDebugInfo && fn->hasOwnership()
|
||||
&& fn->getModule().getStage() != SILStage::Raw) {
|
||||
if (OwnershipForwardingMixin::isa(inst))
|
||||
if (ForwardingInstruction::isa(inst))
|
||||
if (auto newNext = tryEliminateUnneededForwardingInst(inst, *this))
|
||||
return *newNext;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user