From: Michael Gottesman Date: Fri, 21 Jun 2013 19:12:36 +0000 (+0000) Subject: [objcarcopts] Encapsulate PtrState.RRI.CFGHazardAfflicted via methods PtrState.{IsCFG... X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=a211578aa23cccc6b039d290fa46541a6ef1360e;p=oota-llvm.git [objcarcopts] Encapsulate PtrState.RRI.CFGHazardAfflicted via methods PtrState.{IsCFGHazardAfflicted,SetCFGHazardAfflicted}. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184582 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/ObjCARC/ObjCARCOpts.cpp b/lib/Transforms/ObjCARC/ObjCARCOpts.cpp index 8ef08aff790..c6953095932 100644 --- a/lib/Transforms/ObjCARC/ObjCARCOpts.cpp +++ b/lib/Transforms/ObjCARC/ObjCARCOpts.cpp @@ -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); } } }