clayborg added a comment.

We just need to create all DIERef objects using the GetID() from the symbol 
file as the file index, and we should be able to remove the 
SymbolFile::GetUID() function now. As long as file index zero is reserved for 
"vanilla DWARF that doesn't use DWO or OSO we will know the difference. We 
might want to not have SymbolFileDWARF inherit from UserID at all, and switch 
over to have SymbolFileDWARF add a virtual function:

  uint32_t m_file_index = 0; // Zero means main DWARF file, 1...N identifies 
the Nth DWO file or OSO file
  virtual uint32_t GetFileIndex() { return m_file_index; }

Then anyone can set the file index correctly for DWO or OSO files. And we avoid 
using user_id_t values for the symbol files since they aren't needed.



================
Comment at: lldb/source/Plugins/SymbolFile/DWARF/DIERef.h:53
+
+  void set_die_offset(dw_offset_t offset) {
+    lldbassert(offset <= DW_INVALID_OFFSET);
----------------
labath wrote:
> Can we remove this function now?
We should be able to, and we should move this lldbassert to the constructor to 
ensure that die_offset is not too large.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D138618

_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to