#include "llvm/Support/ThreadSafeAllocator.h"
#include "llvm/Config/llvm-config.h"
#include "llvm/Support/ThreadPool.h"
#include "gtest/gtest.h"
#include <atomic>
#include <thread>
usingnamespacellvm;
namespace {
struct AllocCondition { … };
class MockAllocator : public AllocatorBase<MockAllocator> { … };
}
#if (LLVM_ENABLE_THREADS)
TEST(ThreadSafeAllocatorTest, AllocWait) { … }
TEST(ThreadSafeAllocatorTest, AllocWithAlign) { … }
TEST(ThreadSafeAllocatorTest, SpecificBumpPtrAllocator) { … }
#endif