diff options
author | Stephen Tozer <stephen.tozer@sony.com> | 2024-03-14 12:19:15 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-14 12:19:15 +0000 |
commit | 2e865353ed6baa35609e94bf5de9f2061df6eacf (patch) | |
tree | 25ba906fafce3dae1ebe5caf1cae4bfb3d9ddb6c /llvm/lib/Transforms/Utils/LoopUtils.cpp | |
parent | 5f774619eac5db73398225a4c924a9c1d437fb40 (diff) | |
download | llvm-2e865353ed6baa35609e94bf5de9f2061df6eacf.zip llvm-2e865353ed6baa35609e94bf5de9f2061df6eacf.tar.gz llvm-2e865353ed6baa35609e94bf5de9f2061df6eacf.tar.bz2 |
[RemoveDIs][NFC] Move DPValue::filter -> filterDbgVars (#85208)
This patch changes DPValue::filter to be a non-member method
filterDbgVars. There are two reasons for this: firstly, the name of
DPValue is about to change to DbgVariableRecord, which will result in
every `for` loop that uses DPValue::filter to require a line break. This
is a small thing, but it makes the rename patch more difficult to
review, and is just generally more awkward for what is a fairly common
loop. Secondly, the intent is to later break up the DPValue class into
subclasses, at which point it would be better to have a non-member
function that allows template arguments for the cases we want to filter
with greater specificity.
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopUtils.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/LoopUtils.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Utils/LoopUtils.cpp b/llvm/lib/Transforms/Utils/LoopUtils.cpp index 11b7665..c815a7b 100644 --- a/llvm/lib/Transforms/Utils/LoopUtils.cpp +++ b/llvm/lib/Transforms/Utils/LoopUtils.cpp @@ -634,7 +634,7 @@ void llvm::deleteDeadLoop(Loop *L, DominatorTree *DT, ScalarEvolution *SE, // RemoveDIs: do the same as below for DPValues. if (Block->IsNewDbgInfoFormat) { for (DPValue &DPV : llvm::make_early_inc_range( - DPValue::filter(I.getDbgRecordRange()))) { + filterDbgVars(I.getDbgRecordRange()))) { DebugVariable Key(DPV.getVariable(), DPV.getExpression(), DPV.getDebugLoc().get()); if (!DeadDebugSet.insert(Key).second) |