[lldb/DWARF] Don't index dwp file multiple times
Summary: When we added support for type units in dwo files, we changed the "manual" dwarf index to index _all_ dwarf units in the dwo file instead of just the split unit belonging to our skeleton unit. This was fine for dwo files, as they contain only a single compile units and type units do not have a split type unit which would point to them. However, this does not work for dwp files because, these files do contain multiple split compile units, and the current approach means that each unit gets indexed multiple times (once for each split unit => n^2 complexity). This patch teaches the manual dwarf index to treat dwp files specially. Any type units in the dwp file added to the main list of compile units and indexed with them in a single batch. Split compile units in dwp files are still indexed as a part of their skeleton unit -- this is done because we need the DW_AT_language attribute from the skeleton unit to index them properly. Handling of dwo files remains unchanged -- all units (type and skeleton) are indexed when we reach the dwo file through the split unit. Reviewers: clayborg, JDevlieghere, aprantl Subscribers: arphaman, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D74964
Loading
Please register or sign in to comment