diff --git a/llvm/include/llvm/Support/Threading.h b/llvm/include/llvm/Support/Threading.h --- a/llvm/include/llvm/Support/Threading.h +++ b/llvm/include/llvm/Support/Threading.h @@ -130,7 +130,7 @@ /// Get the amount of currency to use for tasks requiring significant /// memory or other resources. Currently based on physical cores, if /// available for the host system, otherwise falls back to - /// thread::hardware_concurrency(). + /// llvm::hardware_concurrency(). /// Returns 1 when LLVM is configured with LLVM_ENABLE_THREADS=OFF unsigned heavyweight_hardware_concurrency(); diff --git a/llvm/lib/Support/Threading.cpp b/llvm/lib/Support/Threading.cpp --- a/llvm/lib/Support/Threading.cpp +++ b/llvm/lib/Support/Threading.cpp @@ -68,7 +68,7 @@ // ADL. int NumPhysical = sys::getHostNumPhysicalCores(); if (NumPhysical == -1) - return std::thread::hardware_concurrency(); + return llvm::hardware_concurrency(); return NumPhysical; }