Support: make LLVM Mutexes STL-compatible

Use lock/unlock() convention instead of acquire/release().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216336 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Dylan Noblesmith
2014-08-23 22:49:22 +00:00
parent 7e3e4311c5
commit d930a30833
7 changed files with 42 additions and 40 deletions

View File

@ -186,11 +186,11 @@ struct LockMutex : ValueMapConfig<KeyT, MutexT> {
};
static void onRAUW(const ExtraData &Data, KeyT Old, KeyT New) {
*Data.CalledRAUW = true;
EXPECT_FALSE(Data.M->tryacquire()) << "Mutex should already be locked.";
EXPECT_FALSE(Data.M->try_lock()) << "Mutex should already be locked.";
}
static void onDelete(const ExtraData &Data, KeyT Old) {
*Data.CalledDeleted = true;
EXPECT_FALSE(Data.M->tryacquire()) << "Mutex should already be locked.";
EXPECT_FALSE(Data.M->try_lock()) << "Mutex should already be locked.";
}
static MutexT *getMutex(const ExtraData &Data) { return Data.M; }
};