[PATCH] D101024: [Debug-Info] make DIE attributes generating under control of strict dwarf
ChenZheng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 12 20:46:06 PDT 2021
shchenz marked an inline comment as done.
shchenz added inline comments.
================
Comment at: llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h:85
+ // DWARF version.
+ if (Attribute != 0 && Asm->TM.Options.DebugStrictDwarf &&
+ DD->getDwarfVersion() < dwarf::AttributeVersion(Attribute))
----------------
dblaikie wrote:
> Might be worth expanding the comment to describe the Attribute 0 case - "Attribute 0 is used when emitting form-encoded values in blocks, which don't have attributes (only forms) so we cannot detect their DWARF version compatibility here and assume they are compatible"
Thanks, will update in the commit
================
Comment at: llvm/test/DebugInfo/PowerPC/strict-dwarf.ll:11
+; is also right for attribute 0.
+; For this case, the location attribute adding is for global variable @_ZL3var
+; and the call chain to addUInt() is:
----------------
dblaikie wrote:
> Rather than using a comment (or in addition to the comment, you can use a CHECK for DW_AT_name of "var" to make it clear that the location checking is for that variable. (with a CHECK-NOT: DW_TAG between the attributes to ensure the test didn't skip from one tag to another between the two attributes)
Thanks for the good idea. Will update this in the commit.
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