[llvm] f2e69d2 - [CodeGen] Use a range-based for loop (NFC)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 26 23:46:39 PST 2024
Author: Kazu Hirata
Date: 2024-01-26T23:46:27-08:00
New Revision: f2e69d2e85463b5c415d5597a59cf41671c15c70
URL: https://github.com/llvm/llvm-project/commit/f2e69d2e85463b5c415d5597a59cf41671c15c70
DIFF: https://github.com/llvm/llvm-project/commit/f2e69d2e85463b5c415d5597a59cf41671c15c70.diff
LOG: [CodeGen] Use a range-based for loop (NFC)
Added:
Modified:
llvm/lib/CodeGen/MIRPrinter.cpp
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/MIRPrinter.cpp b/llvm/lib/CodeGen/MIRPrinter.cpp
index 4e28181588074ff..b19a377f0744832 100644
--- a/llvm/lib/CodeGen/MIRPrinter.cpp
+++ b/llvm/lib/CodeGen/MIRPrinter.cpp
@@ -729,8 +729,7 @@ void MIPrinter::print(const MachineBasicBlock &MBB) {
if (HasLineAttributes)
OS << "\n";
bool IsInBundle = false;
- for (auto I = MBB.instr_begin(), E = MBB.instr_end(); I != E; ++I) {
- const MachineInstr &MI = *I;
+ for (const MachineInstr &MI : MBB.instrs()) {
if (IsInBundle && !MI.isInsideBundle()) {
OS.indent(2) << "}\n";
IsInBundle = false;
More information about the llvm-commits
mailing list