[PATCH] D100630: [Debug-Info][DBX] DW_TAG_rvalue_reference_type should not be generated when dwarf version is smaller than 4

ChenZheng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 10 18:46:16 PDT 2021


shchenz added a comment.

In D100630#2748899 <https://reviews.llvm.org/D100630#2748899>, @dblaikie wrote:

> Does this cause duplicate DW_TAG_reference_types in the output, if the input IR Has both DW_TAG_reference_type and DW_TAG_rvalue_reference_types?

Yes, it will cause such issue in theory. I can not cook a case that has a DW_TAG_reference_type to a DW_TAG_rvalue_reference_types or has a DW_TAG_rvalue_reference_types to a DW_TAG_reference_type for now. Is there such usage that we both be rvalue-reference and lvalue-reference to a basic type?



================
Comment at: llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp:391
+  // version.
+  dwarf::Tag FixedTag = (dwarf::Tag)Tag;
+  if (Asm->TM.Options.DebugStrictDwarf &&
----------------
dblaikie wrote:
> Rather than adding a cast here, perhaps the parameter type could be updated? (maybe in a separate preliminary commit, though, so as not to muddy this one)
Add a new NFC patch D102207


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D100630



More information about the llvm-commits mailing list