aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-02-07 05:29:34 +0000
committerChris Lattner <sabre@nondot.org>2007-02-07 05:29:34 +0000
commit67408dab1b50e17decf788c119ca0194fc7024a6 (patch)
treeec13e8c5795975d99190b307bc17ae207499536e
parentf5111552c24d0dcea3b7b1a9c0d2c1f338191891 (diff)
TypeSymbolTable::rename is dead, remove it
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33982 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/TypeSymbolTable.h4
-rw-r--r--lib/VMCore/TypeSymbolTable.cpp18
2 files changed, 0 insertions, 22 deletions
diff --git a/include/llvm/TypeSymbolTable.h b/include/llvm/TypeSymbolTable.h
index b95415377e..ffea6d7340 100644
--- a/include/llvm/TypeSymbolTable.h
+++ b/include/llvm/TypeSymbolTable.h
@@ -118,10 +118,6 @@ public:
/// @returns true if the erase was successful (TI was found)
bool remove(Type* TI);
- /// Rename a type. This ain't fast, we have to linearly search for it first.
- /// @returns true if the rename was successful (type was found)
- bool rename(Type* T, const std::string& new_name);
-
/// @}
/// @name AbstractTypeUser Methods
/// @{
diff --git a/lib/VMCore/TypeSymbolTable.cpp b/lib/VMCore/TypeSymbolTable.cpp
index ac89bb6645..6cc1055ebc 100644
--- a/lib/VMCore/TypeSymbolTable.cpp
+++ b/lib/VMCore/TypeSymbolTable.cpp
@@ -122,24 +122,6 @@ bool TypeSymbolTable::strip() {
return RemovedSymbol;
}
-/// rename - Given a value with a non-empty name, remove its existing entry
-/// from the symbol table and insert a new one for Name. This is equivalent to
-/// doing "remove(V), V->Name = Name, insert(V)", but is faster, and will not
-/// temporarily remove the symbol table plane if V is the last value in the
-/// symtab with that name (which could invalidate iterators to that plane).
-bool TypeSymbolTable::rename(Type *T, const std::string &name) {
- for (iterator TI = tmap.begin(), TE = tmap.end(); TI != TE; ++TI) {
- if (TI->second == T) {
- // Remove the old entry.
- tmap.erase(TI);
- // Add the new entry.
- this->insert(name,T);
- return true;
- }
- }
- return false;
-}
-
// This function is called when one of the types in the type plane are refined
void TypeSymbolTable::refineAbstractType(const DerivedType *OldType,
const Type *NewType) {