diff options
author | Kazu Hirata <kazu@google.com> | 2021-11-01 22:38:48 -0700 |
---|---|---|
committer | Kazu Hirata <kazu@google.com> | 2021-11-01 22:38:49 -0700 |
commit | 6bdb61c58a55a31f57e65804cc3477f94b0e53f4 (patch) | |
tree | 1e93bec2e55463b70d988b45d0fc609718fb48f9 /llvm/lib/CodeGen/SafeStack.cpp | |
parent | 57d34cb223127bc1e42c6f29f1fe6ae7190091f8 (diff) | |
download | llvm-6bdb61c58a55a31f57e65804cc3477f94b0e53f4.zip llvm-6bdb61c58a55a31f57e65804cc3477f94b0e53f4.tar.gz llvm-6bdb61c58a55a31f57e65804cc3477f94b0e53f4.tar.bz2 |
[CodeGen] Use make_early_inc_range (NFC)
Diffstat (limited to 'llvm/lib/CodeGen/SafeStack.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SafeStack.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/SafeStack.cpp b/llvm/lib/CodeGen/SafeStack.cpp index 4197424..50d9d64 100644 --- a/llvm/lib/CodeGen/SafeStack.cpp +++ b/llvm/lib/CodeGen/SafeStack.cpp @@ -702,9 +702,8 @@ void SafeStack::moveDynamicAllocasToUnsafeStack( if (!DynamicAllocas.empty()) { // Now go through the instructions again, replacing stacksave/stackrestore. - for (inst_iterator It = inst_begin(&F), Ie = inst_end(&F); It != Ie;) { - Instruction *I = &*(It++); - auto II = dyn_cast<IntrinsicInst>(I); + for (Instruction &I : llvm::make_early_inc_range(instructions(&F))) { + auto *II = dyn_cast<IntrinsicInst>(&I); if (!II) continue; |