Support: make LLVM Mutexes STL-compatible
[oota-llvm.git] / include / llvm / IR / ValueMap.h
index 43a79c7db2b94673d3691b88b12f527881c1b281..993694889a5a7dda7b5c9975caff032685cacc1e 100644 (file)
@@ -111,7 +111,7 @@ public:
 
   void clear() { Map.clear(); }
 
-  /// Return 1 if the specified key is in the map, 0 otherwise.\r
+  /// Return 1 if the specified key is in the map, 0 otherwise.
   size_type count(const KeyT &Val) const {
     return Map.find_as(Val) == Map.end() ? 0 : 1;
   }
@@ -217,11 +217,11 @@ public:
     ValueMapCallbackVH Copy(*this);
     typename Config::mutex_type *M = Config::getMutex(Copy.Map->Data);
     if (M)
-      M->acquire();
+      M->lock();
     Config::onDelete(Copy.Map->Data, Copy.Unwrap());  // May destroy *this.
     Copy.Map->Map.erase(Copy);  // Definitely destroys *this.
     if (M)
-      M->release();
+      M->unlock();
   }
   void allUsesReplacedWith(Value *new_key) override {
     assert(isa<KeySansPointerT>(new_key) &&
@@ -230,7 +230,7 @@ public:
     ValueMapCallbackVH Copy(*this);
     typename Config::mutex_type *M = Config::getMutex(Copy.Map->Data);
     if (M)
-      M->acquire();
+      M->lock();
 
     KeyT typed_new_key = cast<KeySansPointerT>(new_key);
     // Can destroy *this:
@@ -246,7 +246,7 @@ public:
       }
     }
     if (M)
-      M->release();
+      M->unlock();
   }
 };