[llvm-commits] CVS: llvm/include/llvm/ValueSymbolTable.h
Chris Lattner
sabre at nondot.org
Tue Feb 6 22:14:08 PST 2007
Changes in directory llvm/include/llvm:
ValueSymbolTable.h updated: 1.5 -> 1.6
---
Log message:
eliminate ValueSymbolTable::rename, it has no advantage over using remove+insert.
Make insert/remove assert if used incorrectly instead of returning a bool.
---
Diffs of the changes: (+4 -13)
ValueSymbolTable.h | 17 ++++-------------
1 files changed, 4 insertions(+), 13 deletions(-)
Index: llvm/include/llvm/ValueSymbolTable.h
diff -u llvm/include/llvm/ValueSymbolTable.h:1.5 llvm/include/llvm/ValueSymbolTable.h:1.6
--- llvm/include/llvm/ValueSymbolTable.h:1.5 Wed Feb 7 00:06:24 2007
+++ llvm/include/llvm/ValueSymbolTable.h Wed Feb 7 00:13:49 2007
@@ -91,7 +91,7 @@
/// @return 1 if the name is in the symbol table, 0 otherwise
/// @brief Determine if a name is in the symbol table
- ValueMap::size_type count(const std::string &name) const {
+ bool count(const std::string &name) const {
return vmap.count(name);
}
@@ -134,18 +134,10 @@
/// This method removes a value from the symbol table. The name of the
/// Value is extracted from \p Val and used to lookup the Value in the
- /// symbol table. If the Value is not in the symbol table, this method
- /// returns false. \p Val is not deleted, just removed from the symbol table.
- /// @returns true if \p Val was successfully removed, false otherwise
+ /// symbol table. \p Val is not deleted, just removed from the symbol table.
/// @brief Remove a value from the symbol table.
- bool remove(Value* Val);
-
- /// 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)".
- /// @brief Rename a value in the symbol table
- bool rename(Value *V, const std::string &Name);
-
+ void remove(Value* Val);
+
/// @}
/// @name Internal Data
/// @{
@@ -154,7 +146,6 @@
mutable uint32_t LastUnique; ///< Counter for tracking unique names
/// @}
-
};
} // End llvm namespace
More information about the llvm-commits
mailing list