mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-28 09:31:03 +00:00
Fix Windows build, don't try to #include <pthread.h> when we know it's not
available. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144574 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8aee7d8f9e
commit
f7228f7038
@ -8,7 +8,10 @@
|
|||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
#include "llvm/Support/ManagedStatic.h"
|
#include "llvm/Support/ManagedStatic.h"
|
||||||
#include "llvm/Support/Threading.h"
|
#include "llvm/Support/Threading.h"
|
||||||
|
#include "llvm/Config/config.h"
|
||||||
|
#ifdef HAVE_PTHREAD_H
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "gtest/gtest.h"
|
#include "gtest/gtest.h"
|
||||||
|
|
||||||
@ -16,6 +19,7 @@ using namespace llvm;
|
|||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
|
#ifdef HAVE_PTHREAD_H
|
||||||
namespace test1 {
|
namespace test1 {
|
||||||
llvm::ManagedStatic<int> ms;
|
llvm::ManagedStatic<int> ms;
|
||||||
void *helper(void*) {
|
void *helper(void*) {
|
||||||
@ -35,5 +39,6 @@ TEST(Initialize, MultipleThreads) {
|
|||||||
pthread_join(t2, NULL);
|
pthread_join(t2, NULL);
|
||||||
llvm_stop_multithreaded();
|
llvm_stop_multithreaded();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
} // anonymous namespace
|
} // anonymous namespace
|
||||||
|
Loading…
x
Reference in New Issue
Block a user