[Lldb-commits] [lldb] [lldb] Remove ConstString from Language::MethodName (PR #218556)
Yao Qi via lldb-commits
lldb-commits at lists.llvm.org
Tue Aug 25 01:35:37 PDT 2026
================
@@ -24,7 +24,7 @@ class CPlusPlusLanguage : public Language {
public:
class CxxMethodName : public Language::MethodName {
public:
- CxxMethodName(ConstString s) : Language::MethodName(s) {}
+ CxxMethodName(std::string s) : Language::MethodName(s) {}
----------------
qiyao wrote:
It copies `s` again when forwarding to the base constructor, so this should be `Language::MethodName(std::move(s))` to avoid the extra allocation/copy on every `CxxMethodName` construction.
https://github.com/llvm/llvm-project/pull/218556
More information about the lldb-commits
mailing list