OSDN Git Service

[Support][unittest] Fix HostTest.NumPhysicalCores on __i386__ after D78324
authorFangrui Song <maskray@google.com>
Wed, 20 May 2020 04:50:17 +0000 (21:50 -0700)
committerFangrui Song <maskray@google.com>
Wed, 20 May 2020 04:51:14 +0000 (21:51 -0700)
llvm/unittests/Support/Host.cpp

index 4edeb40..dd43f04 100644 (file)
@@ -39,7 +39,7 @@ protected:
     // physical cores, which is currently only supported/tested for
     // x86_64 Linux and Darwin.
     return (Host.isOSWindows() && llvm_is_multithreaded()) ||
-           (Host.getArch() == Triple::x86_64 &&
+           (Host.isX86() &&
             (Host.isOSDarwin() || Host.getOS() == Triple::Linux));
   }