[PATCH] D87935: DebugInfo: Filter DWARFv5 TUs out of the debug_info unit list when CUs requested

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 21 00:28:33 PDT 2020


jhenderson added a comment.

My instinct is that I prefer a third approach - simply keep both combined and separate lists - the combined list (could be a vector or an ordered map) is the offset-ordered list of all units, whilst there are then separate lists for compile and type units, with members being pointers to the units stored in the primary list. I think this has the advantage of being very explicit about things, with the drawback being that there are multiple members to keep in sync (possibly alleviated by having a wrapper class around the containers).

If I had to pick between the two existing options, I think I have a marginal preference for this one, since it requires less code and is less surprising to someone who might not be too familiar with the code - I would expect a list of units to be in offset order naturally, and not expect to have to go through some sort of sorting procedure in the future.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D87935



More information about the llvm-commits mailing list