[llvm-commits] [llvm] r89565 - /llvm/trunk/utils/TableGen/Record.h

Bob Wilson bob.wilson at apple.com
Sat Nov 21 14:39:27 PST 2009


Author: bwilson
Date: Sat Nov 21 16:39:27 2009
New Revision: 89565

URL: http://llvm.org/viewvc/llvm-project?rev=89565&view=rev
Log:
Avoid a redundant assertion.

Modified:
    llvm/trunk/utils/TableGen/Record.h

Modified: llvm/trunk/utils/TableGen/Record.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/Record.h?rev=89565&r1=89564&r2=89565&view=diff

==============================================================================
--- llvm/trunk/utils/TableGen/Record.h (original)
+++ llvm/trunk/utils/TableGen/Record.h Sat Nov 21 16:39:27 2009
@@ -1276,13 +1276,12 @@
   }
 
   void removeValue(StringRef Name) {
-    assert(getValue(Name) && "Cannot remove an entry that does not exist!");
     for (unsigned i = 0, e = Values.size(); i != e; ++i)
       if (Values[i].getName() == Name) {
         Values.erase(Values.begin()+i);
         return;
       }
-    assert(0 && "Name does not exist in record!");
+    assert(0 && "Cannot remove an entry that does not exist!");
   }
 
   bool isSubClassOf(const Record *R) const {





More information about the llvm-commits mailing list