Author: Henry Date: 2026-01-03T00:51:41-06:00 New Revision: 48a986839bc81c27afac2599ca057b7a5b1b5d1c
URL: https://github.com/llvm/llvm-project/commit/48a986839bc81c27afac2599ca057b7a5b1b5d1c DIFF: https://github.com/llvm/llvm-project/commit/48a986839bc81c27afac2599ca057b7a5b1b5d1c.diff LOG: [lldb] Avoid unnecessary vector copy for StringList::AppendList (#173779) Added: Modified: lldb/include/lldb/Utility/StringList.h lldb/source/Utility/StringList.cpp Removed: ################################################################################ diff --git a/lldb/include/lldb/Utility/StringList.h b/lldb/include/lldb/Utility/StringList.h index 1357cf17173a4..bb3e18ba3c2dd 100644 --- a/lldb/include/lldb/Utility/StringList.h +++ b/lldb/include/lldb/Utility/StringList.h @@ -49,7 +49,7 @@ class StringList { void AppendList(const char **strv, int strc); - void AppendList(StringList strings); + void AppendList(const StringList &strings); size_t GetSize() const; diff --git a/lldb/source/Utility/StringList.cpp b/lldb/source/Utility/StringList.cpp index 98923a07db704..3c7c0c0471251 100644 --- a/lldb/source/Utility/StringList.cpp +++ b/lldb/source/Utility/StringList.cpp @@ -66,7 +66,7 @@ void StringList::AppendList(const char **strv, int strc) { } } -void StringList::AppendList(StringList strings) { +void StringList::AppendList(const StringList &strings) { m_strings.reserve(m_strings.size() + strings.GetSize()); m_strings.insert(m_strings.end(), strings.begin(), strings.end()); } _______________________________________________ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
