[llvm-commits] CVS: llvm/include/llvm/SymbolTable.h

Chris Lattner lattner at cs.uiuc.edu
Thu Jan 30 14:55:01 PST 2003


Changes in directory llvm/include/llvm:

SymbolTable.h updated: 1.19 -> 1.20

---
Log message:

Add new function to allow removal of typed named elements


---
Diffs of the changes:

Index: llvm/include/llvm/SymbolTable.h
diff -u llvm/include/llvm/SymbolTable.h:1.19 llvm/include/llvm/SymbolTable.h:1.20
--- llvm/include/llvm/SymbolTable.h:1.19	Tue Oct 15 16:26:24 2002
+++ llvm/include/llvm/SymbolTable.h	Thu Jan 30 14:54:03 2003
@@ -41,6 +41,11 @@
     insertEntry(N->getName(), N->getType(), N);
   }
 
+  void remove(Value *N);
+  Value *type_remove(const type_iterator &It) {
+    return removeEntry(find(It->second->getType()), It);
+  }
+
   // insert - Insert a constant or type into the symbol table with the specified
   // name...  There can be a many to one mapping between names and
   // (constant/type)s.
@@ -51,9 +56,11 @@
     insertEntry(Name, V->getType(), V);
   }
 
-  void remove(Value *N);
-  Value *type_remove(const type_iterator &It) {
-    return removeEntry(find(It->second->getType()), It);
+  /// remove - Remove a constant or type from the symbol table with the
+  /// specified name.
+  Value *remove(const std::string &Name, Value *V) {
+    iterator TI = find(V->getType());
+    return removeEntry(TI, TI->second.find(Name));
   }
 
   // getUniqueName - Given a base name, return a string that is either equal to





More information about the llvm-commits mailing list