[clang] [llvm] [RISCV] Add support for getHostCPUFeatures using hwprobe (PR #94352)
Pengcheng Wang via cfe-commits
cfe-commits at lists.llvm.org
Sun Jun 23 21:27:19 PDT 2024
================
@@ -1571,7 +1571,9 @@ StringRef sys::getHostCPUName() {
#if defined(__linux__)
std::unique_ptr<llvm::MemoryBuffer> P = getProcCpuinfoContent();
StringRef Content = P ? P->getBuffer() : "";
- return detail::getHostCPUNameForRISCV(Content);
+ StringRef Name = detail::getHostCPUNameForRISCV(Content);
+ if (!Name.empty())
+ return Name;
----------------
wangpc-pp wrote:
No return statement in the `else` case.
https://github.com/llvm/llvm-project/pull/94352
More information about the cfe-commits
mailing list