aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/TypeSymbolTable.h
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-08-06 06:04:35 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-08-06 06:04:35 +0000
commit8113c6739e854d94910491965d83797487bc8a54 (patch)
tree41f275b338d41d9b59b3db2590544149dce62238 /include/llvm/TypeSymbolTable.h
parent902cf02b0a79e1aaedaf8bb90511e5a92dd37532 (diff)
Don't search the entire type table just to delete a type by name.
- This also fixes the ENABLE_EXPENSIVE_CHECKS failure on vmcore.ml. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78287 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/TypeSymbolTable.h')
-rw-r--r--include/llvm/TypeSymbolTable.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/llvm/TypeSymbolTable.h b/include/llvm/TypeSymbolTable.h
index d00c3b8d0b..4dd3a4af2a 100644
--- a/include/llvm/TypeSymbolTable.h
+++ b/include/llvm/TypeSymbolTable.h
@@ -66,6 +66,16 @@ public:
/// @brief Lookup a type by name.
Type *lookup(const StringRef &name) const;
+ /// Lookup the type associated with name.
+ /// @returns end() if the name is not found, or an iterator at the entry for
+ /// Type.
+ iterator find(const StringRef &name);
+
+ /// Lookup the type associated with name.
+ /// @returns end() if the name is not found, or an iterator at the entry for
+ /// Type.
+ const_iterator find(const StringRef &name) const;
+
/// @returns true iff the symbol table is empty.
/// @brief Determine if the symbol table is empty
inline bool empty() const { return tmap.empty(); }