[Lldb-commits] [PATCH] D116195: [LLDB] Allows overwriting the existing line entry at given file address when inserting

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Dec 23 00:19:29 PST 2021


labath added a comment.

How are you planning to make use of this functionality?

I'm asking because I'm wondering if it wouldn't be better to do this kind of processing in the PDB code, and then hand this class a finished list of line entries. Inserting entries into the middle of a vector is expensive, which is why our dwarf code no longer uses this function (it uses the vector<LineSequence> constructor instead). If we could get pdb to do something similar, then we could get rid of this function altogether.



================
Comment at: lldb/source/Symbol/LineTable.cpp:56-57
+    if (pos->file_addr == file_addr) {
+      uint32_t idx = std::distance(m_entries.begin(), pos);
+      m_entries[idx] = entry;
+      return;
----------------
`*pos = entry` ?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D116195



More information about the lldb-commits mailing list