Author: Alex Langford
Date: 2023-05-16T10:39:44-07:00
New Revision: d95aec2de2be114b4c331783fcceae233bf49aff

URL: 
https://github.com/llvm/llvm-project/commit/d95aec2de2be114b4c331783fcceae233bf49aff
DIFF: 
https://github.com/llvm/llvm-project/commit/d95aec2de2be114b4c331783fcceae233bf49aff.diff

LOG: [lldb][NFCI] Small adjustment to Breakpoint::AddName

m_name_list is a std::unordered_set<std::string>, we can insert the
string directly instead of grabbing the c_str and creating yet another
one.

Added: 
    

Modified: 
    lldb/source/Breakpoint/Breakpoint.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/source/Breakpoint/Breakpoint.cpp 
b/lldb/source/Breakpoint/Breakpoint.cpp
index 54ac21ac9e485..9f00c967be439 100644
--- a/lldb/source/Breakpoint/Breakpoint.cpp
+++ b/lldb/source/Breakpoint/Breakpoint.cpp
@@ -842,7 +842,7 @@ bool Breakpoint::HasResolvedLocations() const {
 size_t Breakpoint::GetNumLocations() const { return m_locations.GetSize(); }
 
 bool Breakpoint::AddName(llvm::StringRef new_name) {
-  m_name_list.insert(new_name.str().c_str());
+  m_name_list.insert(new_name.str());
   return true;
 }
 


        
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to