File tree Expand file tree Collapse file tree 1 file changed +6
-12
lines changed Expand file tree Collapse file tree 1 file changed +6
-12
lines changed Original file line number Diff line number Diff line change @@ -333,18 +333,12 @@ Function::GetSourceInfo() {
333333
334334 uint32_t end_line = start_line;
335335 for (const AddressRange &range : GetAddressRanges ()) {
336- LineEntry entry;
337- uint32_t idx;
338- if (!line_table->FindLineEntryByAddress (range.GetBaseAddress (), entry,
339- &idx))
340- continue ;
341-
342- addr_t end_addr =
343- range.GetBaseAddress ().GetFileAddress () + range.GetByteSize ();
344- while (line_table->GetLineEntryAtIndex (idx++, entry) &&
345- entry.range .GetBaseAddress ().GetFileAddress () < end_addr) {
346- // Ignore entries belonging to inlined functions or #included files.
347- if (source_file_sp->Equal (*entry.file_sp ,
336+ for (auto [idx, end] = line_table->GetLineEntryIndexRange (range); idx < end;
337+ ++idx) {
338+ LineEntry entry;
339+ // Ignore entries belonging to inlined functions or #included files.
340+ if (line_table->GetLineEntryAtIndex (idx, entry) &&
341+ source_file_sp->Equal (*entry.file_sp ,
348342 SupportFile::eEqualFileSpecAndChecksumIfSet))
349343 end_line = std::max (end_line, entry.line );
350344 }
You can’t perform that action at this time.
0 commit comments