1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00

Fix build error.

llvm-svn: 231430
This commit is contained in:
Michael Gottesman 2015-03-05 23:57:07 +00:00
parent c0588d3476
commit 8db6488873
2 changed files with 29 additions and 21 deletions

View File

@ -7,12 +7,14 @@
//
//===----------------------------------------------------------------------===//
#define DEBUG_TYPE "objc-arc-ptr-state"
#include "llvm/Support/Debug.h"
#include "PtrState.h"
using namespace llvm;
using namespace llvm::objcarc;
raw_ostream &operator<<(raw_ostream &OS, const Sequence S) {
raw_ostream &llvm::objcarc::operator<<(raw_ostream &OS, const Sequence S) {
switch (S) {
case S_None:
return OS << "S_None";
@ -91,6 +93,28 @@ bool RRInfo::Merge(const RRInfo &Other) {
return Partial;
}
void PtrState::SetKnownPositiveRefCount() {
DEBUG(dbgs() << "Setting Known Positive.\n");
KnownPositiveRefCount = true;
}
void PtrState::ClearKnownPositiveRefCount() {
DEBUG(dbgs() << "Clearing Known Positive.\n");
KnownPositiveRefCount = false;
}
void PtrState::SetSeq(Sequence NewSeq) {
DEBUG(dbgs() << "Old: " << Seq << "; New: " << NewSeq << "\n");
Seq = NewSeq;
}
void PtrState::ResetSequenceProgress(Sequence NewSeq) {
DEBUG(dbgs() << "Resetting sequence progress.\n");
SetSeq(NewSeq);
Partial = false;
RRI.clear();
}
void PtrState::Merge(const PtrState &Other, bool TopDown) {
Seq = MergeSeqs(GetSeq(), Other.GetSeq(), TopDown);
KnownPositiveRefCount &= Other.KnownPositiveRefCount;

View File

@ -134,34 +134,18 @@ public:
RRI.CFGHazardAfflicted = NewValue;
}
void SetKnownPositiveRefCount() {
DEBUG(dbgs() << "Setting Known Positive.\n");
KnownPositiveRefCount = true;
}
void ClearKnownPositiveRefCount() {
DEBUG(dbgs() << "Clearing Known Positive.\n");
KnownPositiveRefCount = false;
}
void SetKnownPositiveRefCount();
void ClearKnownPositiveRefCount();
bool HasKnownPositiveRefCount() const { return KnownPositiveRefCount; }
void SetSeq(Sequence NewSeq) {
DEBUG(dbgs() << "Old: " << Seq << "; New: " << NewSeq << "\n");
Seq = NewSeq;
}
void SetSeq(Sequence NewSeq);
Sequence GetSeq() const { return static_cast<Sequence>(Seq); }
void ClearSequenceProgress() { ResetSequenceProgress(S_None); }
void ResetSequenceProgress(Sequence NewSeq) {
DEBUG(dbgs() << "Resetting sequence progress.\n");
SetSeq(NewSeq);
Partial = false;
RRI.clear();
}
void ResetSequenceProgress(Sequence NewSeq);
void Merge(const PtrState &Other, bool TopDown);
void InsertCall(Instruction *I) { RRI.Calls.insert(I); }