[llvm-branch-commits] [llvm] [DLCov] Origin-Tracking: Collect stack traces in DebugLoc (PR #143592)
Stephen Tozer via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Wed Jul 2 05:02:13 PDT 2025
================
@@ -27,6 +27,21 @@ namespace llvm {
class Function;
#if LLVM_ENABLE_DEBUGLOC_COVERAGE_TRACKING
+#if LLVM_ENABLE_DEBUGLOC_ORIGIN_TRACKING
+ struct DbgLocOrigin {
+ static constexpr unsigned long MaxDepth = 16;
+ using StackTracesTy =
+ SmallVector<std::pair<int, std::array<void *, MaxDepth>>, 0>;
----------------
SLTozer wrote:
Most of the time we store 0 stacktraces, but when we do store a stacktrace there may be any number of them - the `addTrace` function adds a new stacktrace to the vector, and is used whenever the DebugLoc is "transferred", so that we can track the motion of a missing debug location through the program.
https://github.com/llvm/llvm-project/pull/143592
More information about the llvm-branch-commits
mailing list