[llvm-branch-commits] [llvm] [utils][TableGen] Unify converting names to upper-camel case (PR #141762)
Rahul Joshi via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Tue Jun 3 23:19:48 PDT 2025
================
@@ -113,14 +113,39 @@ class BaseRecord {
// Returns the name of the directive formatted for output. Whitespace are
// replaced with underscores.
- static std::string formatName(StringRef Name) {
+ static std::string getSnakeName(StringRef Name) {
std::string N = Name.str();
llvm::replace(N, ' ', '_');
return N;
}
+ static std::string getUpperCamelName(StringRef Name, StringRef Sep) {
----------------
jurahul wrote:
Can you add a small comment describing what the function does and maybe a sample input/output?
https://github.com/llvm/llvm-project/pull/141762
More information about the llvm-branch-commits
mailing list