Skip to content

Commit 8943036

Browse files
committed
Fix UAF in ARMConstantIslandPass.
Revoke the change in #146198
1 parent fa05864 commit 8943036

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Target/ARM/ARMConstantIslandPass.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -476,8 +476,8 @@ bool ARMConstantIslands::runOnMachineFunction(MachineFunction &mf) {
476476

477477
LLVM_DEBUG(dbgs() << "Beginning BR iteration #" << NoBRIters << '\n');
478478
bool BRChange = false;
479-
for (ImmBranch &Br : llvm::make_early_inc_range(ImmBranches))
480-
BRChange |= fixupImmediateBr(Br);
479+
for (unsigned i = 0, e = ImmBranches.size(); i != e; ++i)
480+
BRChange |= fixupImmediateBr(ImmBranches[i]);
481481
if (BRChange && ++NoBRIters > 30)
482482
report_fatal_error("Branch Fix Up pass failed to converge!");
483483
LLVM_DEBUG(dumpBBs());

0 commit comments

Comments
 (0)