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

Kuan Hsu Chen (Zakk) via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 15 01:42:53 PDT 2020


khchen updated this revision to Diff 278106.
khchen marked 8 inline comments as done.
khchen added a comment.

address @asb's comment. thanks.

Thanks for @lenary bug report.
I cannot reproduce the crash in local,
but I though the problem is cause by removing "Choose a default based on the triple" logic in `getRISCVABI`
The `MArch` value is "unknown" and there is no return value which can match any conditionin.
so I add it back and also update the "invalid arch name" test.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D71124

Files:
  clang/lib/Basic/Targets/RISCV.cpp
  clang/lib/Basic/Targets/RISCV.h
  clang/lib/Driver/ToolChains/Arch/RISCV.cpp
  clang/lib/Driver/ToolChains/CommonArgs.cpp
  clang/test/Driver/riscv-arch.c
  clang/test/Driver/riscv-cpus.c
  llvm/include/llvm/Support/RISCVTargetParser.def
  llvm/include/llvm/Support/TargetParser.h
  llvm/lib/Support/TargetParser.cpp
  llvm/lib/Target/RISCV/RISCV.td

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D71124.278106.patch
Type: text/x-patch
Size: 17582 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200715/ac14e28c/attachment-0001.bin>


More information about the cfe-commits mailing list