[llvm] Add support for verifying local type units in .debug_names. (PR #101133)
Greg Clayton via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 30 10:20:26 PDT 2024
================
@@ -1512,7 +1512,8 @@ DWARFVerifier::verifyNameIndexAbbrevs(const DWARFDebugNames::NameIndex &NI) {
NumErrors += verifyNameIndexAttribute(NI, Abbrev, AttrEnc);
}
- if (NI.getCUCount() > 1 && !Attributes.count(dwarf::DW_IDX_compile_unit)) {
+ if (NI.getCUCount() > 1 && !Attributes.count(dwarf::DW_IDX_compile_unit) &&
+ !Attributes.count(dwarf::DW_IDX_type_unit)) {
ErrorCategory.Report("Abbreviation contains no attribute", [&]() {
error() << formatv("NameIndex @ {0:x}: Indexing multiple compile units "
"and abbreviation {1:x} has no {2} attribute.\n",
----------------
clayborg wrote:
This error message is only for `DW_IDX_comp_unit` missing when we have multiple compile units. This code change stops this error being emitted if we have a name entry that only has a `DW_IDX_type_unit`, which is ok.
https://github.com/llvm/llvm-project/pull/101133
More information about the llvm-commits
mailing list