Skip to content

Commit d351f54

Browse files
committed
[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);} ```
1 parent a0570e7 commit d351f54

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

llvm/lib/Support/Unix/ThreadLocal.inc

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717

1818
#include "llvm/Config/config.h"
1919

20-
#if defined(HAVE_PTHREAD_H) && defined(HAVE_PTHREAD_GETSPECIFIC)
21-
2220
#include <cassert>
2321
#include <pthread.h>
2422
#include <stdlib.h>
@@ -58,13 +56,3 @@ void ThreadLocalImpl::removeInstance() {
5856
}
5957

6058
}
61-
#else
62-
namespace llvm {
63-
using namespace sys;
64-
ThreadLocalImpl::ThreadLocalImpl() : data() { }
65-
ThreadLocalImpl::~ThreadLocalImpl() { }
66-
void ThreadLocalImpl::setInstance(const void* d) { data = const_cast<void*>(d);}
67-
void *ThreadLocalImpl::getInstance() { return data; }
68-
void ThreadLocalImpl::removeInstance() { setInstance(0); }
69-
}
70-
#endif

0 commit comments

Comments
 (0)