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

Kito Cheng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 13 03:36:40 PDT 2021


kito-cheng added inline comments.


================
Comment at: llvm/lib/Support/RISCVISAInfo.cpp:388
+                            const std::vector<std::string> &Features) {
+  std::unique_ptr<RISCVISAInfo> ISAInfo(new RISCVISAInfo());
+  assert(XLen == 32 || XLen == 64);
----------------
craig.topper wrote:
> Use
> 
> ```
> auto ISAInfo = std::make_unique<RISCVISAInfo>()
> ```
`std::make_unique<RISCVISAInfo>()` require a `public` constructor, but I would prefer keep that in `private`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D105168



More information about the llvm-commits mailing list