[PATCH] D101024: [Debug-Info] make DIE attributes generating under control of strict dwarf

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 22 07:55:13 PDT 2021


dblaikie added inline comments.


================
Comment at: llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp:1801-1805
+  // For strict DWARF mode, only generate attributes available to current DWARF
+  // version.
+  if (Asm->TM.Options.DebugStrictDwarf &&
+      DD->getDwarfVersion() < dwarf::AttributeVersion(Attribute))
+    return;
----------------
This patch is adding this boilerplate in several places.

Perhaps it'd be cleaner to refactor the underlying "Die.addValue" call to a helper in DwarfUnit in a preparatory patch, then the boilerplate can be added to that one place?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D101024



More information about the llvm-commits mailing list