DebugInfo: Filter DWARFv5 TUs out of the debug_info unit list when CUs requested
authorDavid Blaikie <dblaikie@gmail.com>
Fri, 18 Sep 2020 18:30:50 +0000 (11:30 -0700)
committerDavid Blaikie <dblaikie@gmail.com>
Thu, 24 Sep 2020 05:15:53 +0000 (22:15 -0700)
commit0328feb086fca6ed8e57265aa073d7600ac9079c
treeea8911993b25c49d34562a622766386df78d958b
parente1ef7183c6f008fa13cbe273500b020c4fad1252
DebugInfo: Filter DWARFv5 TUs out of the debug_info unit list when CUs requested

Since DWARFv5 places TUs in debug_info, some of DWARFContext's APIs have
become a bit erroneous, including TUs in the CU list by accident.
Correct that by providing compile_units (& dwo_compile_units) that
filter out the type units from the debug_info units.

Differential Revision: https://reviews.llvm.org/D87935
llvm/include/llvm/DebugInfo/DWARF/DWARFContext.h
llvm/include/llvm/DebugInfo/DWARF/DWARFDebugMacro.h
llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h
llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
llvm/lib/DebugInfo/DWARF/DWARFDebugMacro.cpp