diff --git a/lib/Target/X86/X86ISelLowering.cpp b/lib/Target/X86/X86ISelLowering.cpp index 2e8909a5c39..76b21aca00e 100644 --- a/lib/Target/X86/X86ISelLowering.cpp +++ b/lib/Target/X86/X86ISelLowering.cpp @@ -12063,7 +12063,7 @@ X86TargetLowering::EmitVAStartSaveXMMRegsWithCustomInserter( // the EFLAGS operand. static bool shouldHaveEFlagsKill(MachineBasicBlock::iterator SelectItr, MachineBasicBlock* BB) { - for (MachineBasicBlock::iterator miI(next(SelectItr)), miE = BB->end(); + for (MachineBasicBlock::iterator miI(llvm::next(SelectItr)), miE = BB->end(); miI != miE; ++miI) { const MachineInstr& mi = *miI; if (mi.readsRegister(X86::EFLAGS)) {