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

Craig Topper via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 1 14:10:26 PDT 2021


craig.topper added inline comments.


================
Comment at: llvm/lib/Support/RISCVISAInfo.cpp:644
+                               "invalid extension prefix '%s'",
+                               Ext.str().c_str());
+    }
----------------
craig.topper wrote:
> does createStringError really require going to from StringRef to std::string to char*?
I guess it does if you use it with %s. Maybe better to use 

```
"invalid extension prefix '" + Ext + "'"
```

since the format string is really a Twine.


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