From d95aec2de2be114b4c331783fcceae233bf49aff Mon Sep 17 00:00:00 2001 From: Alex Langford Date: Tue, 16 May 2023 10:38:49 -0700 Subject: [PATCH] [lldb][NFCI] Small adjustment to Breakpoint::AddName m_name_list is a std::unordered_set, we can insert the string directly instead of grabbing the c_str and creating yet another one. --- lldb/source/Breakpoint/Breakpoint.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lldb/source/Breakpoint/Breakpoint.cpp b/lldb/source/Breakpoint/Breakpoint.cpp index 54ac21a..9f00c96 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; } -- 2.7.4