================ @@ -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>; ---------------- jmorse wrote:
Am I right in reading this as a 16-wide array stored in a vector that's either zero-lengthed or one (given that on initialization we add a single element to the vector)? I feel there must be a better pattern than storing an array in a vector -- a potentially empty unique_ptr to a std::array, and allocate the array off the heap when it's needed? 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