[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:
Fangrui Song 2022-04-11 14:20:33 -07:00
parent a0570e7750
commit d351f54a07
1 changed files with 0 additions and 12 deletions

View File

@ -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