[PATCH] D71124: [RISCV] support clang driver to select cpu

Sam Elliott via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 15 05:43:50 PDT 2020


lenary added a comment.

Thanks for the fix!

Please can you also update `clang/test/Misc/target-invalid-cpu-note.c` for riscv32 and riscv64 - it's likely you'll need the fix in the inline note below.

Also, there are a bunch of clang-tidy issues, which I think we can fix now rather than later.



================
Comment at: llvm/lib/Support/TargetParser.cpp:250
+  for (const auto &C : RISCVCPUInfo) {
+    if (IsRV64 == C.Is64Bit())
+      Values.emplace_back(C.Name);
----------------
This line should be `if (C.Kind != CK_INVALID && IsRV64 == C.Is64Bit())` so that when clang prints out valid CPUs, 'invalid' is not included in the list. 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D71124





More information about the llvm-commits mailing list