aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/MSP430/MSP430InstrInfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Target/MSP430/MSP430InstrInfo.cpp')
-rw-r--r--llvm/lib/Target/MSP430/MSP430InstrInfo.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/Target/MSP430/MSP430InstrInfo.cpp b/llvm/lib/Target/MSP430/MSP430InstrInfo.cpp
index e9e26e295fd5..0646d6faebed 100644
--- a/llvm/lib/Target/MSP430/MSP430InstrInfo.cpp
+++ b/llvm/lib/Target/MSP430/MSP430InstrInfo.cpp
@@ -197,8 +197,7 @@ bool MSP430InstrInfo::analyzeBranch(MachineBasicBlock &MBB,
}
// If the block has any instructions after a JMP, delete them.
- while (std::next(I) != MBB.end())
- std::next(I)->eraseFromParent();
+ MBB.erase(std::next(I), MBB.end());
Cond.clear();
FBB = nullptr;