Skip to content

Commit

Permalink
[objc-arc-opts] Now that PtrState.RRI is encapsulated in PtrState, ma…
Browse files Browse the repository at this point in the history
…ke PtrState.RRI private and delete the TODO.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184587 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
gottesmm committed Jun 21, 2013
1 parent 7250710 commit 5a18572
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions lib/Transforms/ObjCARC/ObjCARCOpts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -518,12 +518,10 @@ namespace {
/// The current position in the sequence.
Sequence Seq : 8;

public:
/// Unidirectional information about the current sequence.
///
/// TODO: Encapsulate this better.
RRInfo RRI;

public:
PtrState() : KnownPositiveRefCount(false), Partial(false),
Seq(S_None) {}

Expand Down Expand Up @@ -615,6 +613,10 @@ namespace {
bool HasReverseInsertPts() const {
return !RRI.ReverseInsertPts.empty();
}

const RRInfo &GetRRInfo() const {
return RRI;
}
};
}

Expand Down Expand Up @@ -1991,7 +1993,7 @@ ObjCARCOpt::VisitInstructionBottomUp(Instruction *Inst,
// Don't do retain+release tracking for IC_RetainRV, because it's
// better to let it remain as the first instruction after a call.
if (Class != IC_RetainRV)
Retains[Inst] = S.RRI;
Retains[Inst] = S.GetRRInfo();
S.ClearSequenceProgress();
break;
case S_None:
Expand Down Expand Up @@ -2245,7 +2247,7 @@ ObjCARCOpt::VisitInstructionTopDown(Instruction *Inst,
case S_Use:
S.SetReleaseMetadata(ReleaseMetadata);
S.SetTailCallRelease(cast<CallInst>(Inst)->isTailCall());
Releases[Inst] = S.RRI;
Releases[Inst] = S.GetRRInfo();
ANNOTATE_TOPDOWN(Inst, Arg, S.GetSeq(), S_None);
S.ClearSequenceProgress();
break;
Expand Down

0 comments on commit 5a18572

Please sign in to comment.