[PATCH] D100440: [Debug-Info] DW_AT_export_symbols shouldn't be generated before version-5 of DWARF.

Paul Robinson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 20 10:20:59 PDT 2021


probinson added a comment.

There may be an opportunity to do this more robustly, instead of scattering the checks all over the place.  Note that the Dwarf.def file already knows the version for each tag and attribute; DwarfDebug already knows the version we're emitting; so if DwarfDebug also had the strict-dwarf flag, it would be easy to add a helper predicate or two that would do the checking for any tag or attribute.

Then the methods that add attributes could generally call the predicate themselves, instead of having higher-level code do it.
For tags you probably do want the higher-level code to call the predicate, but it seems like it would be a lot simpler to do something like `if (canEmitTag(dwarf::DW_TAG_rvalue_reference))` than the kind of thing we're seeing in these patches.

Does that seem reasonable?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D100440



More information about the llvm-commits mailing list