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

@ -248,14 +248,14 @@ GenericValue Interpreter::callExternalFunction(Function *F,
const std::vector<GenericValue> &ArgVals) {
TheInterpreter = this;
FunctionsLock->acquire();
FunctionsLock->lock();
// Do a lookup to see if the function is in our cache... this should just be a
// deferred annotation!
std::map<const Function *, ExFunc>::iterator FI = ExportedFunctions->find(F);
if (ExFunc Fn = (FI == ExportedFunctions->end()) ? lookupFunction(F)
: FI->second) {
FunctionsLock->release();
FunctionsLock->unlock();
return Fn(F->getFunctionType(), ArgVals);
}
@ -273,7 +273,7 @@ GenericValue Interpreter::callExternalFunction(Function *F,
RawFn = RF->second;
}
FunctionsLock->release();
FunctionsLock->unlock();
GenericValue Result;
if (RawFn != 0 && ffiInvoke(RawFn, F, ArgVals, getDataLayout(), Result))