================ @@ -55,22 +70,29 @@ namespace llvm { Temporary }; - // Extends TrackingMDNodeRef to also store a DebugLocKind, allowing Debugify - // to ignore intentionally-empty DebugLocs. - class DILocAndCoverageTracking : public TrackingMDNodeRef { + // Extends TrackingMDNodeRef to also store a DebugLocKind and Origin, + // allowing Debugify to ignore intentionally-empty DebugLocs and display the + // code responsible for generating unintentionally-empty DebugLocs. + // Currently we only need to track the Origin of this DILoc when using a + // DebugLoc that is not annotated (i.e. has DebugLocKind::Normal) and has a + // null DILocation, so only collect the origin stacktrace in those cases. + class DILocAndCoverageTracking : public TrackingMDNodeRef, + public DbgLocOrigin { ---------------- jmorse wrote:
A reflex inside my head says "prefer composition to inheritance" -- is there a reason we need to inherit from DbgLocOrigin, instead of having it as a named member of `DILocAndCoverageTracking`? https://github.com/llvm/llvm-project/pull/143592 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits