Convert a runtime check into an assertion
[oota-llvm.git] / lib / VMCore / SymbolTable.cpp
index 09465305e65e26bd47021d07ba8f66940fc5fd04..4317968d4cdba654e71d4141a49ea24d9a09c9ff 100644 (file)
@@ -123,11 +123,8 @@ void SymbolTable::insertEntry(const string &Name, Value *V) {
   const Type *VTy = V->getType();
 
   // TODO: The typeverifier should catch this when its implemented
-  if (lookup(VTy, Name)) {
-    cerr << "SymbolTable ERROR: Name already in symbol table: '" 
-         << Name << "' for type '" << VTy->getDescription() << "'\n";
-    abort();  // TODO: REMOVE THIS
-  }
+  assert(lookup(VTy, Name) == 0 && 
+        "SymbolTable::insertEntry - Name already in symbol table!");
 
 #if DEBUG_SYMBOL_TABLE
   cerr << this << " Inserting definition: " << Name << ": "