Skip to content

Commit 36f72c8

Browse files
committed
Add static_cast
1 parent 7d8f250 commit 36f72c8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

llvm/lib/TargetParser/Host.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1691,7 +1691,8 @@ StringRef sys::getHostCPUName() {
16911691
/*pair_count=*/std::size(Query), /*cpu_count=*/0,
16921692
/*cpus=*/0, /*flags=*/0);
16931693
if (Ret == 0) {
1694-
RISCV::CPUModel Model{Query[0].Value, Query[1].Value, Query[2].Value};
1694+
RISCV::CPUModel Model{static_cast<uint32_t>(Query[0].Value), Query[1].Value,
1695+
Query[2].Value};
16951696
StringRef Name = RISCV::getCPUNameFromCPUModel(Model);
16961697
if (!Name.empty())
16971698
return Name;

0 commit comments

Comments
 (0)