Don't #include internal header <os/tsd.h> on platforms that don't need it.

Swift SVN r8468
This commit is contained in:
Greg Parker
2013-09-19 23:13:23 +00:00
parent 37b7284e0c
commit f05641d208

View File

@@ -17,8 +17,6 @@
#include "swift/Runtime/Alloc.h"
#include "swift/Runtime/Metadata.h"
#include "llvm/Support/MathExtras.h"
// We'll include this and do per-thread clean up once we actually have threads
//#include <System/pthread_machdep.h>
#include "Private.h"
#include <cassert>
#include <cstring>
@@ -373,6 +371,11 @@ void *swift::swift_slowAlloc(size_t bytes, uint64_t flags) {
// These are implemented in FastEntryPoints.s on some platforms.
#ifndef SWIFT_HAVE_FAST_ENTRY_POINTS
#if __has_include(<os/tsd.h>)
// OS X and iOS internal version
#include <os/tsd.h>
struct AllocCacheEntry {
struct AllocCacheEntry *next;
};
@@ -451,6 +454,12 @@ void swift::swift_rawDealloc(void *ptr, AllocIndex idx) {
setRawAllocCacheEntry(idx, cur);
}
#else
# error no thread-local cache implementation for this platform
#endif
// !SWIFT_HAVE_FAST_ENTRY_POINTS
#endif