summaryrefslogtreecommitdiff
path: root/lldb/source/API/SBCompileUnit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/API/SBCompileUnit.cpp')
-rw-r--r--lldb/source/API/SBCompileUnit.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/lldb/source/API/SBCompileUnit.cpp b/lldb/source/API/SBCompileUnit.cpp
index 46a319c6b7a3..3aa65e225d7a 100644
--- a/lldb/source/API/SBCompileUnit.cpp
+++ b/lldb/source/API/SBCompileUnit.cpp
@@ -77,6 +77,20 @@ SBLineEntry SBCompileUnit::GetLineEntryAtIndex(uint32_t idx) const {
return sb_line_entry;
}
+uint32_t SBCompileUnit::FindLineEntryIndex(lldb::SBLineEntry &line_entry,
+ bool exact) const {
+ LLDB_INSTRUMENT_VA(this, line_entry, exact);
+
+ if (!m_opaque_ptr || !line_entry.IsValid())
+ return UINT32_MAX;
+
+ LineEntry found_line_entry;
+
+ return m_opaque_ptr->FindLineEntry(0, line_entry.GetLine(),
+ line_entry.GetFileSpec().get(), exact,
+ &line_entry.ref());
+}
+
uint32_t SBCompileUnit::FindLineEntryIndex(uint32_t start_idx, uint32_t line,
SBFileSpec *inline_file_spec) const {
LLDB_INSTRUMENT_VA(this, start_idx, line, inline_file_spec);