mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
SIL: remove SILValue::getDef and add a cast operator to ValueBase * as a repelacement. NFC.
This commit is contained in:
@@ -431,7 +431,7 @@ mayGuaranteedUseValue(SILInstruction *User, SILValue Ptr, AliasAnalysis *AA) {
|
||||
if (!Params[i].isGuaranteed())
|
||||
continue;
|
||||
SILValue Op = FAS.getArgument(i);
|
||||
if (!AA->isNoAlias(Op, Ptr.getDef()))
|
||||
if (!AA->isNoAlias(Op, Ptr))
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -561,7 +561,7 @@ static bool addLastUse(SILValue V, SILBasicBlock *BB,
|
||||
ReleaseTracker &Tracker) {
|
||||
for (auto I = BB->rbegin(); I != BB->rend(); ++I) {
|
||||
for (auto &Op : I->getAllOperands())
|
||||
if (Op.get().getDef() == V.getDef()) {
|
||||
if (Op.get() == V) {
|
||||
Tracker.trackLastRelease(&*I);
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user