diff options
author | Kazu Hirata <kazu@google.com> | 2021-01-14 20:30:32 -0800 |
---|---|---|
committer | Kazu Hirata <kazu@google.com> | 2021-01-14 20:30:33 -0800 |
commit | 2efcbe24a75b2a9ff6d59d242f560dca96e5f7e0 (patch) | |
tree | fbea11c5355b72bd1efca72810c3a9f9d60dce12 /llvm/lib/CodeGen/CodeGenPrepare.cpp | |
parent | 9bcc0d1040ddd63b7f82e309c0d5feb4e0c9005e (diff) | |
download | llvm-2efcbe24a75b2a9ff6d59d242f560dca96e5f7e0.zip llvm-2efcbe24a75b2a9ff6d59d242f560dca96e5f7e0.tar.gz llvm-2efcbe24a75b2a9ff6d59d242f560dca96e5f7e0.tar.bz2 |
[llvm] Use llvm::drop_begin (NFC)
Diffstat (limited to 'llvm/lib/CodeGen/CodeGenPrepare.cpp')
-rw-r--r-- | llvm/lib/CodeGen/CodeGenPrepare.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/CodeGenPrepare.cpp b/llvm/lib/CodeGen/CodeGenPrepare.cpp index 564a3d7..2c636e1a 100644 --- a/llvm/lib/CodeGen/CodeGenPrepare.cpp +++ b/llvm/lib/CodeGen/CodeGenPrepare.cpp @@ -661,7 +661,7 @@ bool CodeGenPrepare::eliminateFallThrough(Function &F) { // Use a temporary array to avoid iterator being invalidated when // deleting blocks. SmallVector<WeakTrackingVH, 16> Blocks; - for (auto &Block : llvm::make_range(std::next(F.begin()), F.end())) + for (auto &Block : llvm::drop_begin(F, 1)) Blocks.push_back(&Block); SmallSet<WeakTrackingVH, 16> Preds; @@ -747,7 +747,7 @@ bool CodeGenPrepare::eliminateMostlyEmptyBlocks(Function &F) { // as we remove them. // Note that this intentionally skips the entry block. SmallVector<WeakTrackingVH, 16> Blocks; - for (auto &Block : llvm::make_range(std::next(F.begin()), F.end())) + for (auto &Block : llvm::drop_begin(F, 1)) Blocks.push_back(&Block); for (auto &Block : Blocks) { |