[Lldb-commits] [PATCH] D122988: [BOLT][DWARF] Add version 5 split dwarf support

Alexander Yermolovich via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Apr 25 12:49:21 PDT 2022

ayermolo added inline comments.

Comment at: bolt/include/bolt/Core/DebugData.h:375-377
+    if (Optional<uint64_t> DWOId = Unit.getDWOId())
+      return *DWOId;
+    return Unit.getOffset();
dblaikie wrote:
> That seems like a somewhat problematic API - returning two very different kinds of data (the DWO_ID or the unit offset) seems quite easy to misuse this?
The idea I had behind this APIS is for it to return unique ID representing the CU. As it applies to .debug_addr. For monolithic case is its offset with .debug_info for Split Dwarf case is its DWO ID. At least in my head viewed in that context the return data is the same. It's just something that uniquely identifies this CU, and logic is encapsulated in it.

  rG LLVM Github Monorepo



More information about the lldb-commits mailing list