Author: Kazu Hirata
Date: 2025-06-01T23:23:34-07:00
New Revision: faea938248ccb8fda37d8ac04fc11b25b8f31869

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

LOG: [lldb] Avoid creating a temporary instance of std::string (NFC) (#142294)

GetExceptionBreakpoint takes StringRef to look for a matching
breakpoint, so we don't need to create a temporary instance of
std::string on our own.

Added: 
    

Modified: 
    lldb/tools/lldb-dap/Handler/SetExceptionBreakpointsRequestHandler.cpp

Removed: 
    


################################################################################
diff  --git 
a/lldb/tools/lldb-dap/Handler/SetExceptionBreakpointsRequestHandler.cpp 
b/lldb/tools/lldb-dap/Handler/SetExceptionBreakpointsRequestHandler.cpp
index 09d4fea2a9a22..2214833f8a770 100644
--- a/lldb/tools/lldb-dap/Handler/SetExceptionBreakpointsRequestHandler.cpp
+++ b/lldb/tools/lldb-dap/Handler/SetExceptionBreakpointsRequestHandler.cpp
@@ -76,7 +76,7 @@ void SetExceptionBreakpointsRequestHandler::operator()(
 
   for (const auto &value : *filters) {
     const auto filter = GetAsString(value);
-    auto *exc_bp = dap.GetExceptionBreakpoint(std::string(filter));
+    auto *exc_bp = dap.GetExceptionBreakpoint(filter);
     if (exc_bp) {
       exc_bp->SetBreakpoint();
       unset_filters.erase(std::string(filter));


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

Reply via email to