aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/WebAssembly/WebAssemblyExplicitLocals.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2021-09-20 19:30:02 -0700
committerKazu Hirata <kazu@google.com>2021-09-20 19:30:02 -0700
commit85b4b21c8bbad346d58a30154d2767c39cf3285a (patch)
treefdeb80cdda04b531bc4d9d56cddf864a96996c70 /llvm/lib/Target/WebAssembly/WebAssemblyExplicitLocals.cpp
parentd80d3a358fffce430c94c7e9c716a5641010e4d0 (diff)
downloadllvm-85b4b21c8bbad346d58a30154d2767c39cf3285a.zip
llvm-85b4b21c8bbad346d58a30154d2767c39cf3285a.tar.gz
llvm-85b4b21c8bbad346d58a30154d2767c39cf3285a.tar.bz2
[llvm] Use make_early_inc_range (NFC)
Diffstat (limited to 'llvm/lib/Target/WebAssembly/WebAssemblyExplicitLocals.cpp')
-rw-r--r--llvm/lib/Target/WebAssembly/WebAssemblyExplicitLocals.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyExplicitLocals.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyExplicitLocals.cpp
index 4a0738d..a933d1a 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyExplicitLocals.cpp
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyExplicitLocals.cpp
@@ -252,8 +252,7 @@ bool WebAssemblyExplicitLocals::runOnMachineFunction(MachineFunction &MF) {
// Visit each instruction in the function.
for (MachineBasicBlock &MBB : MF) {
- for (MachineBasicBlock::iterator I = MBB.begin(), E = MBB.end(); I != E;) {
- MachineInstr &MI = *I++;
+ for (MachineInstr &MI : llvm::make_early_inc_range(MBB)) {
assert(!WebAssembly::isArgument(MI.getOpcode()));
if (MI.isDebugInstr() || MI.isLabel())