[DWARF] Use sequential integers for the IDs of the SymbolFileDWOs
authorPavel Labath <pavel@labath.sk>
Mon, 13 May 2019 08:58:34 +0000 (08:58 +0000)
committerPavel Labath <pavel@labath.sk>
Mon, 13 May 2019 08:58:34 +0000 (08:58 +0000)
commit381ba9aedc9364091029aba9c075f43b0a4d4291
tree75ae865f4ae8ba1de4b69bec1ad03221e0cc241e
parent33fdaed4914b1f4cb51f372cfee7ed3cc00589e4
[DWARF] Use sequential integers for the IDs of the SymbolFileDWOs

Summary:
Instead of using the offset of the contained compile unit, we use it's
ID. The goal of this change is two-fold:
- free up space in the user_id_t representation to enable storing the
  debug-info-carrying section (debug_types/debug_info) without
  decreasing the amount of debug info we can address (as would be the
  case with D61503).
- be a step towards supporting DWO files containing more than one unit
  (important for debug_types+dwo, but can also happen with regular
  dwo+lto). For this part to fully work we'd still need to add a way to
  lookup the SymbolFileDWO without going through GetCompileUnitAtIndex,
  but making sure things don't accidentally work because the SymbolFile
  ID is the same as compile unit offset is a step towards that.

Reviewers: JDevlieghere, clayborg, aprantl

Subscribers: mehdi_amini, dexonsmith, tberghammer, jankratochvil, lldb-commits

Differential Revision: https://reviews.llvm.org/D61783

llvm-svn: 360565
lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.cpp