Skip to content

Conversation

@sfu2
Copy link

@sfu2 sfu2 commented Dec 28, 2025

Eliminate redundant vector copies in StringList and its dependent classes.

Eliminate redundant vector copies in StringList  and its dependent classes.
@sfu2 sfu2 requested a review from JDevlieghere as a code owner December 28, 2025 15:03
@github-actions
Copy link

Thank you for submitting a Pull Request (PR) to the LLVM Project!

This PR will be automatically labeled and the relevant teams will be notified.

If you wish to, you can add reviewers by using the "Reviewers" section on this page.

If this is not working for you, it is probably because you do not have write permissions for the repository. In which case you can instead tag reviewers by name in a comment by using @ followed by their GitHub username.

If you have received no comments on your PR for a week, you can request a review by "ping"ing the PR by adding a comment “Ping”. The common courtesy "ping" rate is once a week. Please remember that you are asking for valuable time from other developers.

If you have further questions, they may be answered by the LLVM GitHub User Guide.

You can also ask questions in a comment on this PR, on the LLVM Discord or on the forums.

@llvmbot llvmbot added the lldb label Dec 28, 2025
@llvmbot
Copy link
Member

llvmbot commented Dec 28, 2025

@llvm/pr-subscribers-lldb

Author: Henry (sfu2)

Changes

Eliminate redundant vector copies in StringList and its dependent classes.


Full diff: https://github.com/llvm/llvm-project/pull/173779.diff

2 Files Affected:

  • (modified) lldb/include/lldb/Utility/StringList.h (+1-1)
  • (modified) lldb/source/Utility/StringList.cpp (+1-1)
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());
 }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants