[Lldb-commits] [lldb] [LLDB] Refactored CPlusPlusLanguage::MethodName to break lldb-server dependencies (PR #132274)

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Tue Apr 8 11:24:31 PDT 2025


================
@@ -246,6 +246,8 @@ class Mangled {
   ///     for s, otherwise the enumerator for the mangling scheme detected.
   static Mangled::ManglingScheme GetManglingScheme(llvm::StringRef const name);
 
+  static bool IsCPPMangledName(llvm::StringRef name);
----------------
JDevlieghere wrote:

How about calling this `IsMangledName` and. dropping the CPP/Cxx part altogether? Confusingly the implementation isn't actually checking if the mangling scheme is Itanium, so. this will fire too for Rust and Swift.  Maybe something (like Rust) is relying on that, I don't know. 
```suggestion
  static bool IsMangledName(llvm::StringRef name);
```
That would also provide some parity with this oddly named helper function:
```
static inline bool cstring_is_mangled(llvm::StringRef s) {
  return Mangled::GetManglingScheme(s) != Mangled::eManglingSchemeNone;
}
```

The current name makes it look like it should really belong in the C++ language plugin, where it was previously. 

https://github.com/llvm/llvm-project/pull/132274


More information about the lldb-commits mailing list