Fix build error.
authorMichael Gottesman <mgottesman@apple.com>
Thu, 5 Mar 2015 23:57:07 +0000 (23:57 +0000)
committerMichael Gottesman <mgottesman@apple.com>
Thu, 5 Mar 2015 23:57:07 +0000 (23:57 +0000)
llvm-svn: 231430

llvm/lib/Transforms/ObjCARC/PtrState.cpp
llvm/lib/Transforms/ObjCARC/PtrState.h

index 02c58dd..2b64768 100644 (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;
index 77825b9..342f403 100644 (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); }