[PATCH] D69597: Implement `sys::getHostCPUName()` for Darwin ARM

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 29 18:29:10 PDT 2019


efriedma added inline comments.


================
Comment at: llvm/lib/Support/Host.cpp:1238
+    switch (hostInfo.cpu_subtype) {
+    case CPU_SUBTYPE_ARM_V7S:
+      return "swift";
----------------
What do 64-bit devices return here?  (I assume the call returns CPU_TYPE_ARM for 32-bit code regardless of the CPU?)


================
Comment at: llvm/lib/Support/Host.cpp:1245
+  if (hostInfo.cpu_type == CPU_TYPE_ARM64) {
+   switch (hostInfo.cpu_subtype) {
+    default:
----------------
Can we skip the syscall on `__aarch64__` targets, since you don't really check the result?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D69597/new/

https://reviews.llvm.org/D69597





More information about the llvm-commits mailing list