Skip to content

Commit 03764f2

Browse files
committed
More review comments.
1 parent 38f883f commit 03764f2

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

lldb/source/Breakpoint/BreakpointSite.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,13 @@ std::optional<uint32_t> BreakpointSite::GetSuggestedStackFrameIndex() {
9292
std::optional<uint32_t> result;
9393
std::lock_guard<std::recursive_mutex> guard(m_constituents_mutex);
9494
for (BreakpointLocationSP loc_sp : m_constituents.BreakpointLocations()) {
95-
std::optional<uint32_t> this_result = loc_sp->GetSuggestedStackFrameIndex();
96-
if (this_result) {
97-
if (!result)
98-
result = this_result;
95+
std::optional<uint32_t> loc_frame_index
96+
= loc_sp->GetSuggestedStackFrameIndex();
97+
if (loc_frame_index) {
98+
if (result)
99+
result = std::max(*loc_frame_index, *result);
99100
else
100-
result = std::max(*this_result, *result);
101+
result = this_result;
101102
}
102103
}
103104
return result;

0 commit comments

Comments
 (0)