summaryrefslogtreecommitdiff
path: root/source/Breakpoint/BreakpointIDList.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/Breakpoint/BreakpointIDList.cpp')
-rw-r--r--source/Breakpoint/BreakpointIDList.cpp23
1 files changed, 11 insertions, 12 deletions
diff --git a/source/Breakpoint/BreakpointIDList.cpp b/source/Breakpoint/BreakpointIDList.cpp
index 6d610d512f3b..bc4c2a111fd4 100644
--- a/source/Breakpoint/BreakpointIDList.cpp
+++ b/source/Breakpoint/BreakpointIDList.cpp
@@ -16,9 +16,9 @@
#include "lldb/Breakpoint/Breakpoint.h"
#include "lldb/Breakpoint/BreakpointLocation.h"
-#include "lldb/Interpreter/Args.h"
#include "lldb/Interpreter/CommandReturnObject.h"
#include "lldb/Target/Target.h"
+#include "lldb/Utility/Args.h"
using namespace lldb;
using namespace lldb_private;
@@ -89,14 +89,13 @@ bool BreakpointIDList::FindBreakpointID(const char *bp_id_str,
return FindBreakpointID(*bp_id, position);
}
-void BreakpointIDList::InsertStringArray(const char **string_array,
- size_t array_size,
- CommandReturnObject &result) {
- if (string_array == nullptr)
+void BreakpointIDList::InsertStringArray(
+ llvm::ArrayRef<const char *> string_array, CommandReturnObject &result) {
+ if(string_array.empty())
return;
- for (uint32_t i = 0; i < array_size; ++i) {
- auto bp_id = BreakpointID::ParseCanonicalReference(string_array[i]);
+ for (const char *str : string_array) {
+ auto bp_id = BreakpointID::ParseCanonicalReference(str);
if (bp_id.hasValue())
m_breakpoint_ids.push_back(*bp_id);
}
@@ -237,13 +236,13 @@ void BreakpointIDList::FindAndReplaceIDRanges(Args &old_args, Target *target,
}
// We have valid range starting & ending breakpoint IDs. Go through all
- // the breakpoints in the target and find all the breakpoints that fit
- // into this range, and add them to new_args.
+ // the breakpoints in the target and find all the breakpoints that fit into
+ // this range, and add them to new_args.
// Next check to see if we have location id's. If so, make sure the
- // start_bp_id and end_bp_id are for the same breakpoint; otherwise we
- // have an illegal range: breakpoint id ranges that specify bp locations
- // are NOT allowed to cross major bp id numbers.
+ // start_bp_id and end_bp_id are for the same breakpoint; otherwise we have
+ // an illegal range: breakpoint id ranges that specify bp locations are NOT
+ // allowed to cross major bp id numbers.
if ((start_loc_id != LLDB_INVALID_BREAK_ID) ||
(end_loc_id != LLDB_INVALID_BREAK_ID)) {