Skip to content

Commit f4df0c4

Browse files
authored
[lldb][NFCI] Change parameter type in Target::AddNameToBreakpoint (#71241)
By itself this change does very little, but I plan on refactoring something from StructuredData and it gets much easier with this change.
1 parent 002f422 commit f4df0c4

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

lldb/include/lldb/Target/Target.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -763,9 +763,10 @@ class Target : public std::enable_shared_from_this<Target>,
763763
WatchpointList &GetWatchpointList() { return m_watchpoint_list; }
764764

765765
// Manages breakpoint names:
766-
void AddNameToBreakpoint(BreakpointID &id, const char *name, Status &error);
766+
void AddNameToBreakpoint(BreakpointID &id, llvm::StringRef name,
767+
Status &error);
767768

768-
void AddNameToBreakpoint(lldb::BreakpointSP &bp_sp, const char *name,
769+
void AddNameToBreakpoint(lldb::BreakpointSP &bp_sp, llvm::StringRef name,
769770
Status &error);
770771

771772
void RemoveNameFromBreakpoint(lldb::BreakpointSP &bp_sp, ConstString name);

lldb/source/Target/Target.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -727,7 +727,7 @@ void Target::AddBreakpoint(lldb::BreakpointSP bp_sp, bool internal) {
727727
}
728728
}
729729

730-
void Target::AddNameToBreakpoint(BreakpointID &id, const char *name,
730+
void Target::AddNameToBreakpoint(BreakpointID &id, llvm::StringRef name,
731731
Status &error) {
732732
BreakpointSP bp_sp =
733733
m_breakpoint_list.FindBreakpointByID(id.GetBreakpointID());
@@ -740,7 +740,7 @@ void Target::AddNameToBreakpoint(BreakpointID &id, const char *name,
740740
AddNameToBreakpoint(bp_sp, name, error);
741741
}
742742

743-
void Target::AddNameToBreakpoint(BreakpointSP &bp_sp, const char *name,
743+
void Target::AddNameToBreakpoint(BreakpointSP &bp_sp, llvm::StringRef name,
744744
Status &error) {
745745
if (!bp_sp)
746746
return;

0 commit comments

Comments
 (0)