aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/llvm/SymbolTable.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/include/llvm/SymbolTable.h b/include/llvm/SymbolTable.h
index 7e7cb51f20..fc5f470a65 100644
--- a/include/llvm/SymbolTable.h
+++ b/include/llvm/SymbolTable.h
@@ -41,6 +41,11 @@ public:
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 @@ public:
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