diff options
author | Eugene Zelenko <eugene.zelenko@gmail.com> | 2016-04-05 20:19:49 +0000 |
---|---|---|
committer | Eugene Zelenko <eugene.zelenko@gmail.com> | 2016-04-05 20:19:49 +0000 |
commit | 1760dc2a232bde2175606ba737938d3032f1e49d (patch) | |
tree | 3859bc6b8b21c8d5073ded16260d7a5b3ff99b8f /llvm/lib/Support/Mutex.cpp | |
parent | f2fdd013a29b26791490e3a33beda1bacfeec182 (diff) | |
download | llvm-1760dc2a232bde2175606ba737938d3032f1e49d.zip llvm-1760dc2a232bde2175606ba737938d3032f1e49d.tar.gz llvm-1760dc2a232bde2175606ba737938d3032f1e49d.tar.bz2 |
Fix Clang-tidy modernize-deprecated-headers warnings in remaining files; other minor fixes.
Some Include What You Use suggestions were used too.
Use anonymous namespaces in source files.
Differential revision: http://reviews.llvm.org/D18778
llvm-svn: 265454
Diffstat (limited to 'llvm/lib/Support/Mutex.cpp')
-rw-r--r-- | llvm/lib/Support/Mutex.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/llvm/lib/Support/Mutex.cpp b/llvm/lib/Support/Mutex.cpp index c8d3844..db30c73 100644 --- a/llvm/lib/Support/Mutex.cpp +++ b/llvm/lib/Support/Mutex.cpp @@ -22,22 +22,26 @@ #if !defined(LLVM_ENABLE_THREADS) || LLVM_ENABLE_THREADS == 0 // Define all methods as no-ops if threading is explicitly disabled namespace llvm { + using namespace sys; + MutexImpl::MutexImpl( bool recursive) { } MutexImpl::~MutexImpl() { } bool MutexImpl::acquire() { return true; } bool MutexImpl::release() { return true; } bool MutexImpl::tryacquire() { return true; } -} + +} // end namespace llvm #else #if defined(HAVE_PTHREAD_H) && defined(HAVE_PTHREAD_MUTEX_LOCK) #include <cassert> +#include <cstdlib> #include <pthread.h> -#include <stdlib.h> namespace llvm { + using namespace sys; // Construct a Mutex using pthread calls @@ -110,7 +114,7 @@ MutexImpl::tryacquire() return errorcode == 0; } -} +} // end namespace llvm #elif defined(LLVM_ON_UNIX) #include "Unix/Mutex.inc" |