OSDN Git Service

[C++11] Replace LLVM atomics with std::atomic.
authorBenjamin Kramer <benny.kra@googlemail.com>
Mon, 3 Mar 2014 17:53:30 +0000 (17:53 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Mon, 3 Mar 2014 17:53:30 +0000 (17:53 +0000)
commit4721e55a0c2e749cba4f91aa584508284ff67d2c
tree7ee6c143079fc5ad8ae985013a56b8d381a19918
parent59a451775954483bc4db825d8f9eb660b7c96a06
[C++11] Replace LLVM atomics with std::atomic.

With C++11 we finally have a standardized way to specify atomic operations. Use
them to replace the existing custom implemention. Sadly the translation is not
entirely trivial as std::atomic allows more fine-grained control over the
atomicity. I tried to preserve the old semantics as well as possible.

Differential Revision: http://llvm-reviews.chandlerc.com/D2915

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202730 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/ADT/Statistic.h
include/llvm/PassSupport.h
include/llvm/Support/ManagedStatic.h
lib/IR/Attributes.cpp
lib/IR/DiagnosticInfo.cpp
lib/Support/ManagedStatic.cpp
lib/Support/Statistic.cpp
lib/Support/Threading.cpp
lib/Support/Timer.cpp