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/Unix/ThreadLocal.inc | |
parent | f2fdd013a29b26791490e3a33beda1bacfeec182 (diff) | |
download | bcm5719-llvm-1760dc2a232bde2175606ba737938d3032f1e49d.tar.gz bcm5719-llvm-1760dc2a232bde2175606ba737938d3032f1e49d.zip |
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/Unix/ThreadLocal.inc')
-rw-r--r-- | llvm/lib/Support/Unix/ThreadLocal.inc | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/llvm/lib/Support/Unix/ThreadLocal.inc b/llvm/lib/Support/Unix/ThreadLocal.inc index 31c3f3835b2..78c694c908d 100644 --- a/llvm/lib/Support/Unix/ThreadLocal.inc +++ b/llvm/lib/Support/Unix/ThreadLocal.inc @@ -19,10 +19,11 @@ #if defined(HAVE_PTHREAD_H) && defined(HAVE_PTHREAD_GETSPECIFIC) #include <cassert> +#include <cstdlib> #include <pthread.h> -#include <stdlib.h> namespace llvm { + using namespace sys; ThreadLocalImpl::ThreadLocalImpl() : data() { @@ -56,14 +57,19 @@ void ThreadLocalImpl::removeInstance() { setInstance(nullptr); } -} +} // end namespace llvm #else + namespace llvm { + using namespace sys; + ThreadLocalImpl::ThreadLocalImpl() : data() { } ThreadLocalImpl::~ThreadLocalImpl() { } void ThreadLocalImpl::setInstance(const void* d) { data = const_cast<void*>(d);} void *ThreadLocalImpl::getInstance() { return data; } void ThreadLocalImpl::removeInstance() { setInstance(0); } -} + +} // end namespace llvm + #endif |