Skip to content

Commit 1ce5a80

Browse files
[Mips] Use MachineBasicBlock::pred_size (NFC)
1 parent 24790a7 commit 1ce5a80

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

llvm/lib/Target/Mips/MipsAsmPrinter.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -491,10 +491,7 @@ bool MipsAsmPrinter::isBlockOnlyReachableByFallthrough(const MachineBasicBlock*
491491
return false;
492492

493493
// If there isn't exactly one predecessor, it can't be a fall through.
494-
MachineBasicBlock::const_pred_iterator PI = MBB->pred_begin(), PI2 = PI;
495-
++PI2;
496-
497-
if (PI2 != MBB->pred_end())
494+
if (MBB->pred_size() != 1)
498495
return false;
499496

500497
// The predecessor has to be immediately before this block.

0 commit comments

Comments
 (0)