OSDN Git Service

Avoid a redundant assertion.
authorBob Wilson <bob.wilson@apple.com>
Sat, 21 Nov 2009 22:39:27 +0000 (22:39 +0000)
committerBob Wilson <bob.wilson@apple.com>
Sat, 21 Nov 2009 22:39:27 +0000 (22:39 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89565 91177308-0d34-0410-b5e6-96231b3b80d8

utils/TableGen/Record.h

index 752bd0c..6f7ca82 100644 (file)
@@ -1276,13 +1276,12 @@ public:
   }
 
   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 {