[objcarcopts] Encapsulate PtrState.RRI.CFGHazardAfflicted via methods PtrState.{IsCFG...
authorMichael Gottesman <mgottesman@apple.com>
Fri, 21 Jun 2013 19:12:36 +0000 (19:12 +0000)
committerMichael Gottesman <mgottesman@apple.com>
Fri, 21 Jun 2013 19:12:36 +0000 (19:12 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184582 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/ObjCARC/ObjCARCOpts.cpp

index 8ef08aff7902f10d4f1cc4b64b00267eeda6f5c4..c6953095932aaf2afbcb939cc2ca8e914b75c343 100644 (file)
@@ -555,6 +555,14 @@ namespace {
       RRI.ReleaseMetadata = NewValue;
     }
 
+    bool IsCFGHazardAfflicted() const {
+      return RRI.CFGHazardAfflicted;
+    }
+
+    void SetCFGHazardAfflicted(const bool NewValue) {
+      RRI.CFGHazardAfflicted = NewValue;
+    }
+
     void SetKnownPositiveRefCount() {
       DEBUG(dbgs() << "Setting Known Positive.\n");
       KnownPositiveRefCount = true;
@@ -1752,7 +1760,7 @@ static void CheckForUseCFGHazard(const Sequence SuccSSeq,
       S.ClearSequenceProgress();
       break;
     }
-    S.RRI.CFGHazardAfflicted = true;
+    S.SetCFGHazardAfflicted(true);
     ShouldContinue = true;
     break;
   }
@@ -1894,7 +1902,7 @@ ObjCARCOpt::CheckForCFGHazards(const BasicBlock *BB,
       // safe, stop code motion. This is because whether or not it is safe to
       // remove RR pairs via KnownSafe is an orthogonal concept to whether we
       // are allowed to perform code motion.
-      S.RRI.CFGHazardAfflicted = true;
+      S.SetCFGHazardAfflicted(true);
     }
   }
 }