aboutsummaryrefslogtreecommitdiffstats
path: root/lib/VMCore/TypeSymbolTable.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/VMCore/TypeSymbolTable.cpp')
-rw-r--r--lib/VMCore/TypeSymbolTable.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/VMCore/TypeSymbolTable.cpp b/lib/VMCore/TypeSymbolTable.cpp
index e9c6255..5fa8785 100644
--- a/lib/VMCore/TypeSymbolTable.cpp
+++ b/lib/VMCore/TypeSymbolTable.cpp
@@ -59,6 +59,17 @@ Type* TypeSymbolTable::lookup(const StringRef &Name) const {
return result;
}
+TypeSymbolTable::iterator TypeSymbolTable::find(const StringRef &Name) {
+ sys::SmartScopedReader<true> Reader(*TypeSymbolTableLock);
+ return tmap.find(Name);
+}
+
+TypeSymbolTable::const_iterator
+TypeSymbolTable::find(const StringRef &Name) const {
+ sys::SmartScopedReader<true> Reader(*TypeSymbolTableLock);
+ return tmap.find(Name);
+}
+
// remove - Remove a type from the symbol table...
Type* TypeSymbolTable::remove(iterator Entry) {
TypeSymbolTableLock->writer_acquire();