[Lldb-commits] [lldb] [lldb][NFCI] Change parameter type in Target::AddNameToBreakpoint (PR #71241)
via lldb-commits
lldb-commits at lists.llvm.org
Fri Nov 3 15:21:12 PDT 2023
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-lldb
Author: Alex Langford (bulbazord)
<details>
<summary>Changes</summary>
By itself this change does very little, but I plan on refactoring something from StructuredData and it gets much easier with this change.
---
Full diff: https://github.com/llvm/llvm-project/pull/71241.diff
2 Files Affected:
- (modified) lldb/include/lldb/Target/Target.h (+3-2)
- (modified) lldb/source/Target/Target.cpp (+2-2)
``````````diff
diff --git a/lldb/include/lldb/Target/Target.h b/lldb/include/lldb/Target/Target.h
index 82045988018b606..c37682e2a03859f 100644
--- a/lldb/include/lldb/Target/Target.h
+++ b/lldb/include/lldb/Target/Target.h
@@ -763,9 +763,10 @@ class Target : public std::enable_shared_from_this<Target>,
WatchpointList &GetWatchpointList() { return m_watchpoint_list; }
// Manages breakpoint names:
- void AddNameToBreakpoint(BreakpointID &id, const char *name, Status &error);
+ void AddNameToBreakpoint(BreakpointID &id, llvm::StringRef name,
+ Status &error);
- void AddNameToBreakpoint(lldb::BreakpointSP &bp_sp, const char *name,
+ void AddNameToBreakpoint(lldb::BreakpointSP &bp_sp, llvm::StringRef name,
Status &error);
void RemoveNameFromBreakpoint(lldb::BreakpointSP &bp_sp, ConstString name);
diff --git a/lldb/source/Target/Target.cpp b/lldb/source/Target/Target.cpp
index 5f8756c57675c95..a6d7148c84e20be 100644
--- a/lldb/source/Target/Target.cpp
+++ b/lldb/source/Target/Target.cpp
@@ -727,7 +727,7 @@ void Target::AddBreakpoint(lldb::BreakpointSP bp_sp, bool internal) {
}
}
-void Target::AddNameToBreakpoint(BreakpointID &id, const char *name,
+void Target::AddNameToBreakpoint(BreakpointID &id, llvm::StringRef name,
Status &error) {
BreakpointSP bp_sp =
m_breakpoint_list.FindBreakpointByID(id.GetBreakpointID());
@@ -740,7 +740,7 @@ void Target::AddNameToBreakpoint(BreakpointID &id, const char *name,
AddNameToBreakpoint(bp_sp, name, error);
}
-void Target::AddNameToBreakpoint(BreakpointSP &bp_sp, const char *name,
+void Target::AddNameToBreakpoint(BreakpointSP &bp_sp, llvm::StringRef name,
Status &error) {
if (!bp_sp)
return;
``````````
</details>
https://github.com/llvm/llvm-project/pull/71241
More information about the lldb-commits
mailing list