[llvm-commits] [llvm] r42848 - /llvm/trunk/include/llvm/ADT/ImmutableSet.h

Ted Kremenek kremenek at apple.com
Wed Oct 10 16:35:07 PDT 2007


Author: kremenek
Date: Wed Oct 10 18:35:04 2007
New Revision: 42848

URL: http://llvm.org/viewvc/llvm-project?rev=42848&view=rev
Log:
Removed uninformative assertions that catch problems that will
fire anyway at runtime due to a NULL dereference.

Modified:
    llvm/trunk/include/llvm/ADT/ImmutableSet.h

Modified: llvm/trunk/include/llvm/ADT/ImmutableSet.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/ImmutableSet.h?rev=42848&r1=42847&r2=42848&view=diff

==============================================================================
--- llvm/trunk/include/llvm/ADT/ImmutableSet.h (original)
+++ llvm/trunk/include/llvm/ADT/ImmutableSet.h Wed Oct 10 18:35:04 2007
@@ -302,28 +302,11 @@
   //===--------------------------------------------------===//
 private:
   
-  bool isEmpty(TreeTy* T) const {
-    return !T;
-  }
-  
-  unsigned Height(TreeTy* T) const {
-    return T ? T->getHeight() : 0;
-  }
-  
-  TreeTy* Left(TreeTy* T) const {
-    assert (T);
-    return T->getSafeLeft();
-  }
-  
-  TreeTy* Right(TreeTy* T) const {
-    assert (T);
-    return T->getRight();
-  }
-  
-  value_type_ref Value(TreeTy* T) const {
-    assert (T);
-    return T->Value;
-  }
+  bool           isEmpty(TreeTy* T) const { return !T; }
+  unsigned        Height(TreeTy* T) const { return T ? T->getHeight() : 0; }  
+  TreeTy*           Left(TreeTy* T) const { return T->getSafeLeft(); }
+  TreeTy*          Right(TreeTy* T) const { return T->getRight(); }  
+  value_type_ref   Value(TreeTy* T) const { return T->Value; }
   
   unsigned IncrementHeight(TreeTy* L, TreeTy* R) const {
     unsigned hl = Height(L);





More information about the llvm-commits mailing list