Move getNode() out of line
authorChris Lattner <sabre@nondot.org>
Mon, 10 Feb 2003 18:19:41 +0000 (18:19 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 10 Feb 2003 18:19:41 +0000 (18:19 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5531 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Analysis/DSNode.h
include/llvm/Analysis/DSSupport.h
include/llvm/Analysis/DataStructure/DSNode.h
include/llvm/Analysis/DataStructure/DSSupport.h

index da8050cd9aa80d1d1f7b6122f38c17be9695f87f..f5bd8186025e5d7a931c22d57f87051b11847efd 100644 (file)
@@ -78,7 +78,7 @@ public:
 
   ~DSNode() {
     dropAllReferences();
-    assert(Referrers.empty() && "Referrers to dead node exist!");
+    assert(hasNoReferrers() && "Referrers to dead node exist!");
   }
 
   // Iterator for graph interface... Defined in DSGraphTraits.h
@@ -241,6 +241,10 @@ private:
 //===----------------------------------------------------------------------===//
 // Define inline DSNodeHandle functions that depend on the definition of DSNode
 //
+inline DSNode *DSNodeHandle::getNode() const {
+  return N;
+}
+
 inline void DSNodeHandle::setNode(DSNode *n) {
   if (N) N->removeReferrer(this);
   N = n;
index b00f958a61ac3ef01e878376f242acf4f46a2a65..0daf4f1f92d03336711077c3187399cd71b8530f 100644 (file)
@@ -72,10 +72,10 @@ public:
   inline void swap(DSNodeHandle &H);
 
   // Allow explicit conversion to DSNode...
-  DSNode *getNode() const { return N; }
+  inline DSNode *getNode() const;  // Defined inline in DSNode.h
   unsigned getOffset() const { return Offset; }
 
-  inline void setNode(DSNode *N);  // Defined inline later...
+  inline void setNode(DSNode *N);  // Defined inline in DSNode.h
   void setOffset(unsigned O) { Offset = O; }
 
   void addEdgeTo(unsigned LinkNo, const DSNodeHandle &N);
index da8050cd9aa80d1d1f7b6122f38c17be9695f87f..f5bd8186025e5d7a931c22d57f87051b11847efd 100644 (file)
@@ -78,7 +78,7 @@ public:
 
   ~DSNode() {
     dropAllReferences();
-    assert(Referrers.empty() && "Referrers to dead node exist!");
+    assert(hasNoReferrers() && "Referrers to dead node exist!");
   }
 
   // Iterator for graph interface... Defined in DSGraphTraits.h
@@ -241,6 +241,10 @@ private:
 //===----------------------------------------------------------------------===//
 // Define inline DSNodeHandle functions that depend on the definition of DSNode
 //
+inline DSNode *DSNodeHandle::getNode() const {
+  return N;
+}
+
 inline void DSNodeHandle::setNode(DSNode *n) {
   if (N) N->removeReferrer(this);
   N = n;
index b00f958a61ac3ef01e878376f242acf4f46a2a65..0daf4f1f92d03336711077c3187399cd71b8530f 100644 (file)
@@ -72,10 +72,10 @@ public:
   inline void swap(DSNodeHandle &H);
 
   // Allow explicit conversion to DSNode...
-  DSNode *getNode() const { return N; }
+  inline DSNode *getNode() const;  // Defined inline in DSNode.h
   unsigned getOffset() const { return Offset; }
 
-  inline void setNode(DSNode *N);  // Defined inline later...
+  inline void setNode(DSNode *N);  // Defined inline in DSNode.h
   void setOffset(unsigned O) { Offset = O; }
 
   void addEdgeTo(unsigned LinkNo, const DSNodeHandle &N);