[PATCH] D105168: [RISCV] Unify the arch string parsing logic to RISCVISAInfo.

Zakk Chen via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 8 07:59:56 PDT 2021


khchen added inline comments.


================
Comment at: clang/lib/Driver/ToolChains/Arch/RISCV.cpp:195
   if (MArch.startswith_insensitive("rv32")) {
     // FIXME: parse `March` to find `D` extension properly
     if (MArch.substr(4).contains_insensitive("d") ||
----------------
I think maybe we could use the RISCVISAInfo to parse `March` here now?


================
Comment at: llvm/lib/Support/RISCVISAInfo.cpp:312
+          "minor version number missing after 'p' for extension '%s'",
+          Ext.str().c_str());
+    }
----------------
Would you consider to use Twine as argument here to make code more consistent?


================
Comment at: llvm/lib/Support/RISCVISAInfo.cpp:400
+    if (Add) {
+
+      for (auto const &SupportedExtensionInfo :
----------------
redundant line


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D105168



More information about the cfe-commits mailing list