mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 18:54:02 +01:00
Correctly report modified status for ObjCARCOpt
Differential Revision: https://reviews.llvm.org/D81234
This commit is contained in:
parent
280a4f53ef
commit
5aad0e32c9
@ -676,6 +676,7 @@ bool ObjCARCOpt::OptimizeInlinedAutoreleaseRVCall(
|
||||
// Delete the RV pair, starting with the AutoreleaseRV.
|
||||
AutoreleaseRV->replaceAllUsesWith(
|
||||
cast<CallInst>(AutoreleaseRV)->getArgOperand(0));
|
||||
Changed = true;
|
||||
EraseInstruction(AutoreleaseRV);
|
||||
if (Class == ARCInstKind::RetainRV) {
|
||||
// AutoreleaseRV and RetainRV cancel out. Delete the RetainRV.
|
||||
@ -915,6 +916,7 @@ void ObjCARCOpt::OptimizeIndividualCallImpl(
|
||||
if (!Inst->getType()->isVoidTy())
|
||||
Inst->replaceAllUsesWith(Inst->getOperand(0));
|
||||
Inst->eraseFromParent();
|
||||
Changed = true;
|
||||
return;
|
||||
}
|
||||
|
||||
@ -2052,6 +2054,7 @@ void ObjCARCOpt::OptimizeWeakCalls(Function &F) {
|
||||
// Delete objc_loadWeak calls with no users.
|
||||
if (Class == ARCInstKind::LoadWeak && Inst->use_empty()) {
|
||||
Inst->eraseFromParent();
|
||||
Changed = true;
|
||||
continue;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user