[PATCH] D138176: [dsymutil] Fix assertion: (Ref > InputDIE.getOffset()), function cloneDieReferenceAttribute

Frederic Riss via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 16 19:11:13 PST 2022


friss added inline comments.


================
Comment at: llvm/include/llvm/DWARFLinker/DWARFLinkerCompileUnit.h:81-82
+
+    /// Is DIE a forward or backward reference?
+    bool Reference : 1;
   };
----------------
When I read the comment, I was confused as I thought the flag was used to differentiate between forward and backward references. But in fact it's just signaling a reference to a DIE that has not been emitted yet. Maybe tweak the comment.


================
Comment at: llvm/lib/DWARFLinker/DWARFLinker.cpp:961
+      uint64_t Attr = 0xBADDEF;
       Unit.noteForwardReference(
           NewRefDie, RefUnit, RefInfo.Ctxt,
----------------
Should we change the name of this function now that it's not only about forward references.


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

https://reviews.llvm.org/D138176



More information about the llvm-commits mailing list