aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2025-03-29 16:53:02 -0700
committerGitHub <noreply@github.com>2025-03-29 16:53:02 -0700
commite3a3f78f35e091f005197bdd8f0464684546b5a0 (patch)
tree56c508636280cfbaf4470a64acf405b665bc7a44 /llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp
parent8f5c3deadd79a19c8585e014581288e92462a97c (diff)
downloadllvm-e3a3f78f35e091f005197bdd8f0464684546b5a0.zip
llvm-e3a3f78f35e091f005197bdd8f0464684546b5a0.tar.gz
llvm-e3a3f78f35e091f005197bdd8f0464684546b5a0.tar.bz2
[CodeGen] Use llvm::append_range (NFC) (#133603)
Diffstat (limited to 'llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp')
-rw-r--r--llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp b/llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp
index 9f11ccf..c70c638 100644
--- a/llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp
+++ b/llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp
@@ -4218,9 +4218,7 @@ std::optional<ValueIDNum> InstrRefBasedLDV::resolveDbgPHIsImpl(
}
// Sort PHIs to validate into RPO-order.
- SmallVector<LDVSSAPhi *, 8> SortedPHIs;
- for (auto &PHI : CreatedPHIs)
- SortedPHIs.push_back(PHI);
+ SmallVector<LDVSSAPhi *, 8> SortedPHIs(CreatedPHIs);
llvm::sort(SortedPHIs, [&](LDVSSAPhi *A, LDVSSAPhi *B) {
return BBToOrder[&A->getParent()->BB] < BBToOrder[&B->getParent()->BB];