diff options
author | Michael Gottesman <mgottesman@apple.com> | 2013-06-21 07:00:44 +0000 |
---|---|---|
committer | Michael Gottesman <mgottesman@apple.com> | 2013-06-21 07:00:44 +0000 |
commit | 8fcf2ca81c32fc3a60f489c56b565d6bdbb7c419 (patch) | |
tree | 3b18873f427660cc4133da0ef8a0ddc5577d7337 | |
parent | 00dacc44f5f3f3a67d4c7af6146d5584f709bc78 (diff) | |
download | external_llvm-8fcf2ca81c32fc3a60f489c56b565d6bdbb7c419.zip external_llvm-8fcf2ca81c32fc3a60f489c56b565d6bdbb7c419.tar.gz external_llvm-8fcf2ca81c32fc3a60f489c56b565d6bdbb7c419.tar.bz2 |
[objcarcopts] Encapsulate PtrState.RRI.IsTailCallRelease into the method PtrState.IsTailCallRelease() and PtrState.SetTailCallRelease().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184533 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Transforms/ObjCARC/ObjCARCOpts.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/Transforms/ObjCARC/ObjCARCOpts.cpp b/lib/Transforms/ObjCARC/ObjCARCOpts.cpp index 56bcd10..e1a81dd 100644 --- a/lib/Transforms/ObjCARC/ObjCARCOpts.cpp +++ b/lib/Transforms/ObjCARC/ObjCARCOpts.cpp @@ -539,6 +539,14 @@ namespace { RRI.KnownSafe = NewValue; } + bool IsTailCallRelease() const { + return RRI.IsTailCallRelease; + } + + void SetTailCallRelease(const bool NewValue) { + RRI.IsTailCallRelease = NewValue; + } + void SetKnownPositiveRefCount() { DEBUG(dbgs() << "Setting Known Positive.\n"); KnownPositiveRefCount = true; @@ -1918,7 +1926,7 @@ ObjCARCOpt::VisitInstructionBottomUp(Instruction *Inst, S.ResetSequenceProgress(NewSeq); S.RRI.ReleaseMetadata = ReleaseMetadata; S.SetKnownSafe(S.HasKnownPositiveRefCount()); - S.RRI.IsTailCallRelease = cast<CallInst>(Inst)->isTailCall(); + S.SetTailCallRelease(cast<CallInst>(Inst)->isTailCall()); S.RRI.Calls.insert(Inst); S.SetKnownPositiveRefCount(); break; @@ -2203,7 +2211,7 @@ ObjCARCOpt::VisitInstructionTopDown(Instruction *Inst, // FALL THROUGH case S_Use: S.RRI.ReleaseMetadata = ReleaseMetadata; - S.RRI.IsTailCallRelease = cast<CallInst>(Inst)->isTailCall(); + S.SetTailCallRelease(cast<CallInst>(Inst)->isTailCall()); Releases[Inst] = S.RRI; ANNOTATE_TOPDOWN(Inst, Arg, S.GetSeq(), S_None); S.ClearSequenceProgress(); |