[llvm] [NFC] RuntimeLibcalls: Prefix the impls with 'Impl_' and use an enum class (PR #153850)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 15 17:44:49 PDT 2025
================
@@ -157,7 +157,7 @@ class RuntimeLibcallImpl {
const Record *getDef() const { return TheDef; }
- StringRef getName() const { return TheDef->getName(); }
+ Twine getName() const { return Twine("Impl_") + TheDef->getName(); }
----------------
arsenm wrote:
Twine should not be returned by value like this. Should keep this returning the original StringRef, and add the prefix at the emission time.
I think the prefix should not be Impl, it's pretty ugly and you end up with multiple adjacent "Impls" in the name.
How about "RTLIB_", "lc_", "libcall_"?
https://github.com/llvm/llvm-project/pull/153850
More information about the llvm-commits
mailing list