summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/RWMutex.cpp
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2016-04-05 20:45:04 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2016-04-05 20:45:04 +0000
commit91d3cfed785b46723ebbf8197f70aa0f854c05d7 (patch)
tree94f71306bb51cc3e1cadab7d71e0de2d51328b89 /llvm/lib/Support/RWMutex.cpp
parent27e95f7c7b22117e5f36d1ef874dac9b48555f18 (diff)
downloadbcm5719-llvm-91d3cfed785b46723ebbf8197f70aa0f854c05d7.tar.gz
bcm5719-llvm-91d3cfed785b46723ebbf8197f70aa0f854c05d7.zip
Revert "Fix Clang-tidy modernize-deprecated-headers warnings in remaining files; other minor fixes."
This reverts commit r265454 since it broke the build. E.g.: http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-incremental_build/22413/ llvm-svn: 265459
Diffstat (limited to 'llvm/lib/Support/RWMutex.cpp')
-rw-r--r--llvm/lib/Support/RWMutex.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/llvm/lib/Support/RWMutex.cpp b/llvm/lib/Support/RWMutex.cpp
index 2a3239a22b2..3b6309cef21 100644
--- a/llvm/lib/Support/RWMutex.cpp
+++ b/llvm/lib/Support/RWMutex.cpp
@@ -13,6 +13,7 @@
#include "llvm/Config/config.h"
#include "llvm/Support/RWMutex.h"
+#include <cstring>
//===----------------------------------------------------------------------===//
//=== WARNING: Implementation here must contain only TRULY operating system
@@ -22,27 +23,23 @@
#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;
-
RWMutexImpl::RWMutexImpl() { }
RWMutexImpl::~RWMutexImpl() { }
bool RWMutexImpl::reader_acquire() { return true; }
bool RWMutexImpl::reader_release() { return true; }
bool RWMutexImpl::writer_acquire() { return true; }
bool RWMutexImpl::writer_release() { return true; }
-
-} // end namespace llvm
+}
#else
#if defined(HAVE_PTHREAD_H) && defined(HAVE_PTHREAD_RWLOCK_INIT)
#include <cassert>
-#include <cstdlib>
#include <pthread.h>
+#include <stdlib.h>
namespace llvm {
-
using namespace sys;
// Construct a RWMutex using pthread calls
@@ -116,7 +113,7 @@ RWMutexImpl::writer_release()
return errorcode == 0;
}
-} // end namespace llvm
+}
#elif defined(LLVM_ON_UNIX)
#include "Unix/RWMutex.inc"
OpenPOWER on IntegriCloud