Skip to content

Commit

Permalink
[DebugInfo][InstrRef] Handle transfers of variadic debug values in LDV
Browse files Browse the repository at this point in the history
This patch adds the last of the changes required to enable
DBG_VALUE_LIST handling in InstrRefLDV, handling variadic debug values
during the transfer tracking step. Most of the changes are fairly
straightforward, and based around tracking multiple locations per
variable in TransferTracker::VLocTracker.

Differential Revision: https://reviews.llvm.org/D128211
  • Loading branch information
SLTozer committed Aug 23, 2022
1 parent 342e0eb commit 89d0cc9
Show file tree
Hide file tree
Showing 3 changed files with 358 additions and 139 deletions.
18 changes: 18 additions & 0 deletions llvm/include/llvm/ADT/STLExtras.h
Expand Up @@ -1645,6 +1645,24 @@ OutputIt copy(R &&Range, OutputIt Out) {
return std::copy(adl_begin(Range), adl_end(Range), Out);
}

/// Provide wrappers to std::replace_copy_if which take ranges instead of having
/// to pass begin/end explicitly.
template <typename R, typename OutputIt, typename UnaryPredicate, typename T>
OutputIt replace_copy_if(R &&Range, OutputIt Out, UnaryPredicate P,
const T &NewValue) {
return std::replace_copy_if(adl_begin(Range), adl_end(Range), Out, P,
NewValue);
}

/// Provide wrappers to std::replace_copy which take ranges instead of having to
/// pass begin/end explicitly.
template <typename R, typename OutputIt, typename T>
OutputIt replace_copy(R &&Range, OutputIt Out, const T &OldValue,
const T &NewValue) {
return std::replace_copy(adl_begin(Range), adl_end(Range), Out, OldValue,
NewValue);
}

/// Provide wrappers to std::move which take ranges instead of having to
/// pass begin/end explicitly.
template <typename R, typename OutputIt>
Expand Down

0 comments on commit 89d0cc9

Please sign in to comment.