1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00

Fix 01b02a73de78 to use correct macro spelling and fix unit tests.

This commit is contained in:
Amy Huang 2020-02-14 15:31:45 -08:00
parent ef81b8a752
commit 4ca15f6a1c
2 changed files with 3 additions and 2 deletions

View File

@ -1326,7 +1326,7 @@ int computeHostNumPhysicalCores() {
}
return count;
}
#elif defined(_WIN32) && LLVM_THREADS_ENABLED
#elif defined(_WIN32) && LLVM_ENABLE_THREADS != 0
// Defined in llvm/lib/Support/Windows/Threading.inc
int computeHostNumPhysicalCores();
#else

View File

@ -13,6 +13,7 @@
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/Program.h"
#include "llvm/Support/Threading.h"
#include "gtest/gtest.h"
@ -37,7 +38,7 @@ protected:
// Initially this is only testing detection of the number of
// physical cores, which is currently only supported/tested for
// x86_64 Linux and Darwin.
return Host.isOSWindows() ||
return (Host.isOSWindows() && llvm_is_multithreaded()) ||
(Host.getArch() == Triple::x86_64 &&
(Host.isOSDarwin() || Host.getOS() == Triple::Linux));
}