[Lldb-commits] [PATCH] D125437: [lldb/API] Add SBCompileUnit::GetIndexForLineEntry method to SB API

Jonas Devlieghere via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri May 13 11:50:56 PDT 2022


JDevlieghere added inline comments.


================
Comment at: lldb/include/lldb/API/SBCompileUnit.h:37
 
+  uint32_t GetIndexForLineEntry(lldb::SBLineEntry &line_entry,
+                                bool exact = false) const;
----------------
mib wrote:
> JDevlieghere wrote:
> > How's this different from `FindLineEntryIndex`? In other words why not make this an `FindLineEntryIndex` overload? It would be good to document this here (too). 
> We already have a line entry but we just want to get the index in the compile unit, so it made sense to have a separate method for this.
I was referring to the name. It seems weird to have a few overloads of `FindLineEntryIndex` and then a totally different function `GetIndexForLineEntry`. Are they conceptually different enough to have different names? Don't they both return the line entry index? 


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D125437/new/

https://reviews.llvm.org/D125437



More information about the lldb-commits mailing list