mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 02:33:06 +01:00
[FuzzerUtil] Partially revert D38481 on FuzzerUtil
This is because lib/Fuzzer doesn't really depend on llvm infrastucture. It's not easy to access the llvm hardware_concurrency here. Differential Reivision: https://reviews.llvm.org/D38481 llvm-svn: 314870
This commit is contained in:
parent
d7b3a5d1ff
commit
8fdf405e3b
@ -195,7 +195,15 @@ void PrintPC(const char *SymbolizedFMT, const char *FallbackFMT, uintptr_t PC) {
|
||||
Printf(FallbackFMT, PC);
|
||||
}
|
||||
|
||||
unsigned NumberOfCpuCores() { return hardware_concurrency(); }
|
||||
unsigned NumberOfCpuCores() {
|
||||
unsigned N = std::thread::hardware_concurrency();
|
||||
if (!N) {
|
||||
Printf("WARNING: std::thread::hardware_concurrency not well defined for "
|
||||
"your platform. Assuming CPU count of 1.\n");
|
||||
N = 1;
|
||||
}
|
||||
return N;
|
||||
}
|
||||
|
||||
size_t SimpleFastHash(const uint8_t *Data, size_t Size) {
|
||||
size_t Res = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user