diff options
| author | Benjamin Kramer <benny.kra@googlemail.com> | 2019-08-07 11:59:44 +0000 |
|---|---|---|
| committer | Benjamin Kramer <benny.kra@googlemail.com> | 2019-08-07 11:59:44 +0000 |
| commit | e57b60f321024064353b46489cfb25ee01fd55d7 (patch) | |
| tree | b71a61770bccc543c2d25ab846ea7e8acbb1cd34 /clang/tools | |
| parent | 45ee93323ba69b3ad01e9a9a70c6e61d5f9d2df5 (diff) | |
| download | bcm5719-llvm-e57b60f321024064353b46489cfb25ee01fd55d7.tar.gz bcm5719-llvm-e57b60f321024064353b46489cfb25ee01fd55d7.zip | |
Replace non-recursive sys::Mutex users with std::mutex
Also remove a use of sys::MutexImpl, that's just evil. No functionality
change intended.
llvm-svn: 368157
Diffstat (limited to 'clang/tools')
| -rw-r--r-- | clang/tools/libclang/Indexing.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/clang/tools/libclang/Indexing.cpp b/clang/tools/libclang/Indexing.cpp index 36c08122052..1d30bbf6056 100644 --- a/clang/tools/libclang/Indexing.cpp +++ b/clang/tools/libclang/Indexing.cpp @@ -28,7 +28,6 @@ #include "clang/Lex/PreprocessorOptions.h" #include "llvm/Support/CrashRecoveryContext.h" #include "llvm/Support/MemoryBuffer.h" -#include "llvm/Support/Mutex.h" #include <cstdio> #include <mutex> #include <utility> @@ -122,22 +121,21 @@ namespace llvm { namespace { class SessionSkipBodyData { - llvm::sys::Mutex Mux; + std::mutex Mux; PPRegionSetTy ParsedRegions; public: - SessionSkipBodyData() : Mux(/*recursive=*/false) {} ~SessionSkipBodyData() { //llvm::errs() << "RegionData: " << Skipped.size() << " - " << Skipped.getMemorySize() << "\n"; } void copyTo(PPRegionSetTy &Set) { - std::lock_guard<llvm::sys::Mutex> MG(Mux); + std::lock_guard<std::mutex> MG(Mux); Set = ParsedRegions; } void update(ArrayRef<PPRegion> Regions) { - std::lock_guard<llvm::sys::Mutex> MG(Mux); + std::lock_guard<std::mutex> MG(Mux); ParsedRegions.insert(Regions.begin(), Regions.end()); } }; |

