[PATCH] D31236: Refactor getHostCPUName to allow testing on non-native hardware.
Chandler Carruth via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 30 01:29:05 PDT 2017
chandlerc added inline comments.
================
Comment at: llvm/trunk/include/llvm/Support/Host.h:80-85
+ /// helper functions to extract HostCPUName from /proc/cpuinfo on linux.
+ namespace LinuxReadCpuInfo {
+ StringRef getHostCPUName_powerpc(const StringRef &ProcCpuinfoContent);
+ StringRef getHostCPUName_arm(const StringRef &ProcCpuinfoContent);
+ StringRef getHostCPUName_s390x(const StringRef &ProcCpuinfoContent);
+ }
----------------
Capitalize 'helper' to make the comment prose.
Also, we more commonly use a 'detail' or 'internal' namespace. That would seem more consistent here.
And please follow the normal naming conventions rather than using a '_<arch>' suffix. Perhaps: `getHostCPUNameForPowerPC`, `getHostCPUNameForARM`, and `getHostCPUNameForS390x`.
Repository:
rL LLVM
https://reviews.llvm.org/D31236
More information about the llvm-commits
mailing list