[PATCH] D81234: Correctly report modified status for ObjCARCOpt
    serge via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Fri Jun  5 07:13:23 PDT 2020
    
    
  
This revision was automatically updated to reflect the committed changes.
Closed by commit rG80f1ec7008ff: Correctly report modified status for ObjCARCOpt (authored by serge-sans-paille).
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D81234/new/
https://reviews.llvm.org/D81234
Files:
  llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
Index: llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
===================================================================
--- llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
+++ llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
@@ -676,6 +676,7 @@
   // 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 @@
       if (!Inst->getType()->isVoidTy())
         Inst->replaceAllUsesWith(Inst->getOperand(0));
       Inst->eraseFromParent();
+      Changed = true;
       return;
     }
 
@@ -2052,6 +2054,7 @@
     // Delete objc_loadWeak calls with no users.
     if (Class == ARCInstKind::LoadWeak && Inst->use_empty()) {
       Inst->eraseFromParent();
+      Changed = true;
       continue;
     }
 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D81234.268788.patch
Type: text/x-patch
Size: 967 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200605/65982b36/attachment.bin>
    
    
More information about the llvm-commits
mailing list