Skip to content

Commit 487b285

Browse files
author
Piyush Jaiswal
committed
Remove redundant lines of code and update comments
1 parent 8baa770 commit 487b285

File tree

4 files changed

+5
-9
lines changed

4 files changed

+5
-9
lines changed

lldb/include/lldb/Target/Target.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1348,14 +1348,14 @@ class Target : public std::enable_shared_from_this<Target>,
13481348

13491349
/// Sends a breakpoint notification event if any listener is registered.
13501350
/// \param[in] bp
1351-
/// The breakpoint that was hit.
1351+
/// The breakpoint to send a nofication for.
13521352
/// \param[in] eventKind
13531353
/// The kind of event that occurred.
13541354
void NotifyBreakpointChanged(Breakpoint &bp,
13551355
lldb::BreakpointEventType eventKind);
13561356
/// Sends a breakpoint notification event if any listener is registered.
13571357
/// \param[in] bp
1358-
/// The breakpoint that was hit.
1358+
/// The breakpoint that has changed.
13591359
/// \param[in] data
13601360
/// The data associated with the event.
13611361
void NotifyBreakpointChanged(Breakpoint &bp,

lldb/source/Breakpoint/Breakpoint.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1100,9 +1100,6 @@ bool Breakpoint::EvaluatePrecondition(StoppointCallbackContext &context) {
11001100
void Breakpoint::SendBreakpointChangedEvent(
11011101
lldb::BreakpointEventType eventKind) {
11021102
if (!IsInternal()) {
1103-
std::shared_ptr<BreakpointEventData> data =
1104-
std::make_shared<BreakpointEventData>(eventKind, shared_from_this());
1105-
11061103
GetTarget().NotifyBreakpointChanged(*this, eventKind);
11071104
}
11081105
}

lldb/source/Breakpoint/BreakpointList.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ using namespace lldb;
1616
using namespace lldb_private;
1717

1818
static void NotifyChange(const BreakpointSP &bp, BreakpointEventType event) {
19-
Target &target = bp->GetTarget();
20-
target.NotifyBreakpointChanged(*bp, event);
19+
bp->GetTarget().NotifyBreakpointChanged(*bp, event);
2120
}
2221

2322
BreakpointList::BreakpointList(bool is_internal)

lldb/source/Target/Target.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5249,10 +5249,10 @@ void Target::DumpSectionLoadList(Stream &s) {
52495249
void Target::NotifyBreakpointChanged(Breakpoint &bp,
52505250
lldb::BreakpointEventType eventKind) {
52515251
if (EventTypeHasListeners(Target::eBroadcastBitBreakpointChanged)) {
5252-
std::shared_ptr<Breakpoint::BreakpointEventData> data =
5252+
std::shared_ptr<Breakpoint::BreakpointEventData> data_sp =
52535253
std::make_shared<Breakpoint::BreakpointEventData>(
52545254
eventKind, bp.shared_from_this());
5255-
BroadcastEvent(Target::eBroadcastBitBreakpointChanged, data);
5255+
BroadcastEvent(Target::eBroadcastBitBreakpointChanged, data_sp);
52565256
}
52575257
}
52585258

0 commit comments

Comments
 (0)