OSDN Git Service

Support: add llvm::unique_lock
authorDylan Noblesmith <nobled@dreamwidth.org>
Sat, 23 Aug 2014 23:07:14 +0000 (23:07 +0000)
committerDylan Noblesmith <nobled@dreamwidth.org>
Sat, 23 Aug 2014 23:07:14 +0000 (23:07 +0000)
commit389f13012fc618bdc3eaf252d8e3c1aca4a44376
treeb56f7592d0fc552e1c04fec01302d2bbd9c55f84
parentd930a308333a640aba76d2dbc01b0ba097ee4cee
Support: add llvm::unique_lock

Based on the STL class of the same name, it guards a mutex
while also allowing it to be unlocked conditionally before
destruction.

This eliminates the last naked usages of mutexes in LLVM and
clang.

It also uncovered and fixed a bug in callExternalFunction()
when compiled without USE_LIBFFI, where the mutex would never
be unlocked if the end of the function was reached.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216338 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/IR/ValueMap.h
include/llvm/Support/UniqueLock.h [new file with mode: 0644]
lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp
lib/Support/Unix/Signals.inc