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

Jessica Clarke via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 18 12:49:05 PDT 2021


jrtc27 added a comment.

Two options come to mind if we really need to be outputting a StringRef:

1. (the simpler option) Pass in a Twine -> `const char *` lambda that the caller hooks up to Args.MakeArgString
2. (probably the nicer option) Invent our own MakeArgString that allocates from storage owned by RISCVISAInfo itself; lots of ways you can do that

Adding a new library just so we can use MakeArgString seems overkill, even if there are other things that perhaps belong in something a bit less shared than Support.


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