[Lldb-commits] [PATCH] D102658: [lldb/API] Use a valid LineEntry object in SBCompileUnit::FindLineEntryIndex

Med Ismail Bennani via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon May 17 16:29:59 PDT 2021


mib created this revision.
mib added reviewers: JDevlieghere, jingham.
mib added a project: LLDB.
Herald added a subscriber: arphaman.
mib requested review of this revision.
Herald added a subscriber: lldb-commits.

This patch updates `SBCompileUnit::FindLineEntryIndex` to pass a valid
`LineEntry` pointer to `CompileUnit::FindLineEntry`.

This caused `LineTable::FindLineEntryIndexByFileIndexImpl` to return its
`best_match` initial value (UINT32_MAX).

rdar://78115426

Signed-off-by: Med Ismail Bennani <medismail.bennani at gmail.com>


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D102658

Files:
  lldb/source/API/SBCompileUnit.cpp


Index: lldb/source/API/SBCompileUnit.cpp
===================================================================
--- lldb/source/API/SBCompileUnit.cpp
+++ lldb/source/API/SBCompileUnit.cpp
@@ -108,9 +108,10 @@
     else
       file_spec = m_opaque_ptr->GetPrimaryFile();
 
+    LineEntry line_entry;
     index = m_opaque_ptr->FindLineEntry(
         start_idx, line, inline_file_spec ? inline_file_spec->get() : nullptr,
-        exact, nullptr);
+        exact, &line_entry);
   }
 
   return index;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D102658.346014.patch
Type: text/x-patch
Size: 498 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20210517/f48cadae/attachment.bin>


More information about the lldb-commits mailing list