diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2019-08-07 10:57:25 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2019-08-07 10:57:25 +0000 |
commit | 3d5360a4398bfa6878f94ca9ac55bc568692c765 (patch) | |
tree | 8517d65dccdea329b5f6fa6eced147ed4c219371 /clang/lib/Frontend/PrecompiledPreamble.cpp | |
parent | befde45a6f606429cadd1ea5d57679c1955ef2a8 (diff) | |
download | bcm5719-llvm-3d5360a4398bfa6878f94ca9ac55bc568692c765.tar.gz bcm5719-llvm-3d5360a4398bfa6878f94ca9ac55bc568692c765.zip |
Replace llvm::MutexGuard/UniqueLock with their standard equivalents
All supported platforms have <mutex> now, so we don't need our own
copies any longer. No functionality change intended.
llvm-svn: 368149
Diffstat (limited to 'clang/lib/Frontend/PrecompiledPreamble.cpp')
-rw-r--r-- | clang/lib/Frontend/PrecompiledPreamble.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/lib/Frontend/PrecompiledPreamble.cpp b/clang/lib/Frontend/PrecompiledPreamble.cpp index 842ffe24708..93f19294dc0 100644 --- a/clang/lib/Frontend/PrecompiledPreamble.cpp +++ b/clang/lib/Frontend/PrecompiledPreamble.cpp @@ -28,10 +28,10 @@ #include "llvm/Support/CrashRecoveryContext.h" #include "llvm/Support/FileSystem.h" #include "llvm/Support/Mutex.h" -#include "llvm/Support/MutexGuard.h" #include "llvm/Support/Process.h" #include "llvm/Support/VirtualFileSystem.h" #include <limits> +#include <mutex> #include <utility> using namespace clang; @@ -106,20 +106,20 @@ TemporaryFiles &TemporaryFiles::getInstance() { } TemporaryFiles::~TemporaryFiles() { - llvm::MutexGuard Guard(Mutex); + std::lock_guard<llvm::sys::Mutex> Guard(Mutex); for (const auto &File : Files) llvm::sys::fs::remove(File.getKey()); } void TemporaryFiles::addFile(StringRef File) { - llvm::MutexGuard Guard(Mutex); + std::lock_guard<llvm::sys::Mutex> Guard(Mutex); auto IsInserted = Files.insert(File).second; (void)IsInserted; assert(IsInserted && "File has already been added"); } void TemporaryFiles::removeFile(StringRef File) { - llvm::MutexGuard Guard(Mutex); + std::lock_guard<llvm::sys::Mutex> Guard(Mutex); auto WasPresent = Files.erase(File); (void)WasPresent; assert(WasPresent && "File was not tracked"); |