Skip to content

Commit 632db80

Browse files
committed
Guard struct RISCVHwProbe by __linux__ macro
1 parent 4914cdd commit 632db80

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

llvm/lib/TargetParser/Host.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1672,11 +1672,13 @@ StringRef sys::getHostCPUName() {
16721672
return "generic";
16731673
}
16741674
#elif defined(__riscv)
1675+
#if defined(__linux__)
16751676
// struct riscv_hwprobe
16761677
struct RISCVHwProbe {
16771678
int64_t Key;
16781679
uint64_t Value;
16791680
};
1681+
#endif
16801682

16811683
StringRef sys::getHostCPUName() {
16821684
#if defined(__linux__)

0 commit comments

Comments
 (0)