aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/LegacyPassManager.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2025-03-20 22:24:06 -0700
committerGitHub <noreply@github.com>2025-03-20 22:24:06 -0700
commit599005686a1c27ffe97bb4eb07fcd98359a2af99 (patch)
tree044944abd13d5134772d7507fef23ac7a6a52a21 /llvm/lib/IR/LegacyPassManager.cpp
parent13bb2f450ef9f64f393fe5527e5ac68362af8ccd (diff)
downloadllvm-599005686a1c27ffe97bb4eb07fcd98359a2af99.zip
llvm-599005686a1c27ffe97bb4eb07fcd98359a2af99.tar.gz
llvm-599005686a1c27ffe97bb4eb07fcd98359a2af99.tar.bz2
[llvm] Use *Set::insert_range (NFC) (#132325)
DenseSet, SmallPtrSet, SmallSet, SetVector, and StringSet recently gained C++23-style insert_range. This patch replaces: Dest.insert(Src.begin(), Src.end()); with: Dest.insert_range(Src); This patch does not touch custom begin like succ_begin for now.
Diffstat (limited to 'llvm/lib/IR/LegacyPassManager.cpp')
-rw-r--r--llvm/lib/IR/LegacyPassManager.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/IR/LegacyPassManager.cpp b/llvm/lib/IR/LegacyPassManager.cpp
index ce6f6c73..9ac6e9c 100644
--- a/llvm/lib/IR/LegacyPassManager.cpp
+++ b/llvm/lib/IR/LegacyPassManager.cpp
@@ -606,7 +606,7 @@ PMTopLevelManager::setLastUser(ArrayRef<Pass*> AnalysisPasses, Pass *P) {
auto &LastUsedByAP = InversedLastUser[AP];
for (Pass *L : LastUsedByAP)
LastUser[L] = P;
- InversedLastUser[P].insert(LastUsedByAP.begin(), LastUsedByAP.end());
+ InversedLastUser[P].insert_range(LastUsedByAP);
LastUsedByAP.clear();
}
}