diff options
Diffstat (limited to 'include/llvm/Analysis/DataStructure')
-rw-r--r-- | include/llvm/Analysis/DataStructure/DSNode.h | 6 | ||||
-rw-r--r-- | include/llvm/Analysis/DataStructure/DSSupport.h | 4 |
2 files changed, 7 insertions, 3 deletions
diff --git a/include/llvm/Analysis/DataStructure/DSNode.h b/include/llvm/Analysis/DataStructure/DSNode.h index da8050cd9a..f5bd818602 100644 --- a/include/llvm/Analysis/DataStructure/DSNode.h +++ b/include/llvm/Analysis/DataStructure/DSNode.h @@ -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; diff --git a/include/llvm/Analysis/DataStructure/DSSupport.h b/include/llvm/Analysis/DataStructure/DSSupport.h index b00f958a61..0daf4f1f92 100644 --- a/include/llvm/Analysis/DataStructure/DSSupport.h +++ b/include/llvm/Analysis/DataStructure/DSSupport.h @@ -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); |