This test has been failing intermittently on some builders, probably due to a
race on the WorkThreads vector. This patch should fix that.
TEST_F(CoreAPIsStandardTest, TestLookupWithThreadedMaterialization) {
#if LLVM_ENABLE_THREADS
+ std::mutex WorkThreadsMutex;
std::vector<std::thread> WorkThreads;
ES.setDispatchTask([&](std::unique_ptr<Task> T) {
+ std::lock_guard<std::mutex> Lock(WorkThreadsMutex);
WorkThreads.push_back(
std::thread([T = std::move(T)]() mutable { T->run(); }));
});