[llvm] r231430 - Fix build error.
Michael Gottesman
mgottesman at apple.com
Thu Mar 5 15:57:07 PST 2015
Author: mgottesman
Date: Thu Mar 5 17:57:07 2015
New Revision: 231430
URL: http://llvm.org/viewvc/llvm-project?rev=231430&view=rev
Log:
Fix build error.
Modified:
llvm/trunk/lib/Transforms/ObjCARC/PtrState.cpp
llvm/trunk/lib/Transforms/ObjCARC/PtrState.h
Modified: llvm/trunk/lib/Transforms/ObjCARC/PtrState.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/ObjCARC/PtrState.cpp?rev=231430&r1=231429&r2=231430&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/ObjCARC/PtrState.cpp (original)
+++ llvm/trunk/lib/Transforms/ObjCARC/PtrState.cpp Thu Mar 5 17:57:07 2015
@@ -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;
Modified: llvm/trunk/lib/Transforms/ObjCARC/PtrState.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/ObjCARC/PtrState.h?rev=231430&r1=231429&r2=231430&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/ObjCARC/PtrState.h (original)
+++ llvm/trunk/lib/Transforms/ObjCARC/PtrState.h Thu Mar 5 17:57:07 2015
@@ -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); }
More information about the llvm-commits
mailing list