[Mlir-commits] [llvm] [mlir] [NFC][TableGen] Use `Twine` for Name argument in CodeGenHelpers (PR #163581)
Mehdi Amini
llvmlistbot at llvm.org
Thu Oct 16 13:06:04 PDT 2025
joker-eph wrote:
> Maybe I should go through https://discourse.llvm.org/t/correct-use-of-stringref-and-twine/20142
I think this deserves a Discourse post: it seems that 14y old discussion didn't lead to definitive conclusion, and the codebase does not seem to consistently prefer Twine to StringRef in general as far as I can tell (?). At least I probably used Twine only a handful of time in APIs for the last 6 years, I assumed StringRef to be the default and the pattern of `(...+...).str()` to be usual at call-sites.
A guideline (in the coding standard) would be great for this!
https://github.com/llvm/llvm-project/pull/163581
More information about the Mlir-commits
mailing list