diff options
author | Jonas Devlieghere <jonas@devlieghere.com> | 2024-08-02 09:51:47 -0700 |
---|---|---|
committer | Jonas Devlieghere <jonas@devlieghere.com> | 2024-08-02 09:53:34 -0700 |
commit | c6ce324fa7fb2438b945fa1205b2a23138327e83 (patch) | |
tree | 45ef37185b480db2daf44fbc0e572bf5634ee8e9 /lldb/source/Commands/CommandObjectBreakpoint.cpp | |
parent | 1c1b8c20c2d58b6a307e6fdc6db271e81ee8d603 (diff) | |
download | llvm-c6ce324fa7fb2438b945fa1205b2a23138327e83.zip llvm-c6ce324fa7fb2438b945fa1205b2a23138327e83.tar.gz llvm-c6ce324fa7fb2438b945fa1205b2a23138327e83.tar.bz2 |
[lldb] Eliminate more Targer* in favor of Target& in CommandObjects (NFC)
The majority of the replaced Target pointers were already used
unconditionally and the few that were shouldn't even be NULL.
Diffstat (limited to 'lldb/source/Commands/CommandObjectBreakpoint.cpp')
-rw-r--r-- | lldb/source/Commands/CommandObjectBreakpoint.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/lldb/source/Commands/CommandObjectBreakpoint.cpp b/lldb/source/Commands/CommandObjectBreakpoint.cpp index aad03af..abde27b 100644 --- a/lldb/source/Commands/CommandObjectBreakpoint.cpp +++ b/lldb/source/Commands/CommandObjectBreakpoint.cpp @@ -848,7 +848,7 @@ protected: BreakpointIDList valid_bp_ids; CommandObjectMultiwordBreakpoint::VerifyBreakpointOrLocationIDs( - command, &target, result, &valid_bp_ids, + command, target, result, &valid_bp_ids, BreakpointName::Permissions::PermissionKinds::disablePerm); if (result.Succeeded()) { @@ -929,7 +929,7 @@ protected: // Particular breakpoint selected; enable that breakpoint. BreakpointIDList valid_bp_ids; CommandObjectMultiwordBreakpoint::VerifyBreakpointOrLocationIDs( - command, &target, result, &valid_bp_ids, + command, target, result, &valid_bp_ids, BreakpointName::Permissions::PermissionKinds::disablePerm); if (result.Succeeded()) { @@ -1035,7 +1035,7 @@ protected: BreakpointIDList valid_bp_ids; CommandObjectMultiwordBreakpoint::VerifyBreakpointOrLocationIDs( - command, &target, result, &valid_bp_ids, + command, target, result, &valid_bp_ids, BreakpointName::Permissions::PermissionKinds::disablePerm); if (result.Succeeded()) { @@ -1180,7 +1180,7 @@ protected: // Particular breakpoints selected; show info about that breakpoint. BreakpointIDList valid_bp_ids; CommandObjectMultiwordBreakpoint::VerifyBreakpointOrLocationIDs( - command, &target, result, &valid_bp_ids, + command, target, result, &valid_bp_ids, BreakpointName::Permissions::PermissionKinds::listPerm); if (result.Succeeded()) { @@ -1459,7 +1459,7 @@ protected: if (!command.empty()) { CommandObjectMultiwordBreakpoint::VerifyBreakpointOrLocationIDs( - command, &target, result, &excluded_bp_ids, + command, target, result, &excluded_bp_ids, BreakpointName::Permissions::PermissionKinds::deletePerm); if (!result.Succeeded()) return; @@ -1478,7 +1478,7 @@ protected: } } else { CommandObjectMultiwordBreakpoint::VerifyBreakpointOrLocationIDs( - command, &target, result, &valid_bp_ids, + command, target, result, &valid_bp_ids, BreakpointName::Permissions::PermissionKinds::deletePerm); if (!result.Succeeded()) return; @@ -1781,7 +1781,7 @@ protected: // Particular breakpoint selected; disable that breakpoint. BreakpointIDList valid_bp_ids; CommandObjectMultiwordBreakpoint::VerifyBreakpointIDs( - command, &target, result, &valid_bp_ids, + command, target, result, &valid_bp_ids, BreakpointName::Permissions::PermissionKinds::listPerm); if (result.Succeeded()) { @@ -1855,7 +1855,7 @@ protected: // Particular breakpoint selected; disable that breakpoint. BreakpointIDList valid_bp_ids; CommandObjectMultiwordBreakpoint::VerifyBreakpointIDs( - command, &target, result, &valid_bp_ids, + command, target, result, &valid_bp_ids, BreakpointName::Permissions::PermissionKinds::deletePerm); if (result.Succeeded()) { @@ -2328,7 +2328,7 @@ protected: BreakpointIDList valid_bp_ids; if (!command.empty()) { CommandObjectMultiwordBreakpoint::VerifyBreakpointIDs( - command, &target, result, &valid_bp_ids, + command, target, result, &valid_bp_ids, BreakpointName::Permissions::PermissionKinds::listPerm); if (!result.Succeeded()) { @@ -2410,7 +2410,7 @@ CommandObjectMultiwordBreakpoint::CommandObjectMultiwordBreakpoint( CommandObjectMultiwordBreakpoint::~CommandObjectMultiwordBreakpoint() = default; void CommandObjectMultiwordBreakpoint::VerifyIDs( - Args &args, Target *target, bool allow_locations, + Args &args, Target &target, bool allow_locations, CommandReturnObject &result, BreakpointIDList *valid_ids, BreakpointName::Permissions ::PermissionKinds purpose) { // args can be strings representing 1). integers (for breakpoint ids) @@ -2427,9 +2427,9 @@ void CommandObjectMultiwordBreakpoint::VerifyIDs( Args temp_args; if (args.empty()) { - if (target->GetLastCreatedBreakpoint()) { + if (target.GetLastCreatedBreakpoint()) { valid_ids->AddBreakpointID(BreakpointID( - target->GetLastCreatedBreakpoint()->GetID(), LLDB_INVALID_BREAK_ID)); + target.GetLastCreatedBreakpoint()->GetID(), LLDB_INVALID_BREAK_ID)); result.SetStatus(eReturnStatusSuccessFinishNoResult); } else { result.AppendError( @@ -2445,7 +2445,7 @@ void CommandObjectMultiwordBreakpoint::VerifyIDs( // into TEMP_ARGS. if (llvm::Error err = BreakpointIDList::FindAndReplaceIDRanges( - args, target, allow_locations, purpose, temp_args)) { + args, &target, allow_locations, purpose, temp_args)) { result.SetError(std::move(err)); return; } @@ -2469,7 +2469,7 @@ void CommandObjectMultiwordBreakpoint::VerifyIDs( for (size_t i = 0; i < count; ++i) { BreakpointID cur_bp_id = valid_ids->GetBreakpointIDAtIndex(i); Breakpoint *breakpoint = - target->GetBreakpointByID(cur_bp_id.GetBreakpointID()).get(); + target.GetBreakpointByID(cur_bp_id.GetBreakpointID()).get(); if (breakpoint != nullptr) { const size_t num_locations = breakpoint->GetNumLocations(); if (static_cast<size_t>(cur_bp_id.GetLocationID()) > num_locations) { |