Remove all the LLVM_COMPACTIFY_SENTINELS-related macro magic as discussed with Chris...
[oota-llvm.git] / include / llvm / ADT / ilist.h
index a451a184ce77c1532c2766b4e5b3df868d7ddc3a..2f35a7ad25c7f1d1762f772e252b92e2a11ca037 100644 (file)
 #include "llvm/ADT/iterator.h"
 #include <cassert>
 
-#undef LLVM_COMPACTIFY_SENTINELS
-/// @brief activate small sentinel structs
-/// Comment out if you want better debuggability
-/// of ilist<> end() iterators.
-/// See also llvm/ADT/ilist_node.h, where the
-/// same change must be made.
-///
-#define LLVM_COMPACTIFY_SENTINELS 1
-
-#if defined(LLVM_COMPACTIFY_SENTINELS) && LLVM_COMPACTIFY_SENTINELS
-#   define sentinel_tail_assert(COND)
-#else
-#   define sentinel_tail_assert(COND) assert(COND)
-#endif
-
 namespace llvm {
 
 template<typename NodeTy, typename Traits> class iplist;
@@ -204,12 +189,10 @@ public:
 
   // Accessors...
   operator pointer() const {
-    sentinel_tail_assert(Traits::getNext(NodePtr) != 0 && "Dereferencing end()!");
     return NodePtr;
   }
 
   reference operator*() const {
-    sentinel_tail_assert(Traits::getNext(NodePtr) != 0 && "Dereferencing end()!");
     return *NodePtr;
   }
   pointer operator->() const { return &operator*(); }
@@ -230,7 +213,6 @@ public:
   }
   ilist_iterator &operator++() {      // preincrement - Advance
     NodePtr = Traits::getNext(NodePtr);
-    sentinel_tail_assert(NodePtr && "++'d off the end of an ilist!");
     return *this;
   }
   ilist_iterator operator--(int) {    // postdecrement operators...