forked from OSchip/llvm-project
[Support] Remove unused/uncompilable !HAVE_PTHREAD_GETSPECIFIC code path
lib/Support/ThreadLocal.cpp has been uncompilable since rL158346 (2012-06) when `data` became a char array. The error looks like ``` ...llvm/lib/Support/Unix/ThreadLocal.inc:66:57: error: array type 'char[8]' is not assignable void ThreadLocalImpl::setInstance(const void* d) { data = const_cast<void*>(d);} ```
This commit is contained in:
parent
a0570e7750
commit
d351f54a07
|
@ -17,8 +17,6 @@
|
|||
|
||||
#include "llvm/Config/config.h"
|
||||
|
||||
#if defined(HAVE_PTHREAD_H) && defined(HAVE_PTHREAD_GETSPECIFIC)
|
||||
|
||||
#include <cassert>
|
||||
#include <pthread.h>
|
||||
#include <stdlib.h>
|
||||
|
@ -58,13 +56,3 @@ void ThreadLocalImpl::removeInstance() {
|
|||
}
|
||||
|
||||
}
|
||||
#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); }
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue