aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2025-04-27 15:59:57 -0700
committerGitHub <noreply@github.com>2025-04-27 15:59:57 -0700
commit5cfd81b0cc9f92f3d4903f4e7b97769fe7b565b9 (patch)
treebf1f97859ef5c2bf5c4b933e980905038092a06f /llvm/lib/Transforms/Utils/BasicBlockUtils.cpp
parent25b05e0b234fe4d26f9717bf505566892479bee6 (diff)
downloadllvm-5cfd81b0cc9f92f3d4903f4e7b97769fe7b565b9.zip
llvm-5cfd81b0cc9f92f3d4903f4e7b97769fe7b565b9.tar.gz
llvm-5cfd81b0cc9f92f3d4903f4e7b97769fe7b565b9.tar.bz2
[llvm] Use range constructors of *Set (NFC) (#137552)
Diffstat (limited to 'llvm/lib/Transforms/Utils/BasicBlockUtils.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/BasicBlockUtils.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp b/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp
index 9ed8b06..429037a 100644
--- a/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp
+++ b/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp
@@ -249,8 +249,8 @@ bool llvm::MergeBlockIntoPredecessor(BasicBlock *BB, DomTreeUpdater *DTU,
assert(!DT && "cannot use both DT and DTU for updates");
// To avoid processing the same predecessor more than once.
SmallPtrSet<BasicBlock *, 8> SeenSuccs;
- SmallPtrSet<BasicBlock *, 2> SuccsOfPredBB(succ_begin(PredBB),
- succ_end(PredBB));
+ SmallPtrSet<BasicBlock *, 2> SuccsOfPredBB(llvm::from_range,
+ successors(PredBB));
Updates.reserve(Updates.size() + 2 * succ_size(BB) + 1);
// Add insert edges first. Experimentally, for the particular case of two
// blocks that can be merged, with a single successor and single predecessor