X86: Fix another dereferenced end() iterator after r278532

llvm-svn: 278577
This commit is contained in:
Hans Wennborg 2016-08-12 23:35:59 +00:00
parent 4a9b99ee92
commit 2d87ccfd58
1 changed files with 1 additions and 1 deletions

View File

@ -1959,7 +1959,7 @@ bool X86FrameLowering::restoreCalleeSavedRegisters(MachineBasicBlock &MBB,
if (CSI.empty())
return false;
if (isFuncletReturnInstr(*MI) && STI.isOSWindows()) {
if (MI != MBB.end() && isFuncletReturnInstr(*MI) && STI.isOSWindows()) {
// Don't restore CSRs in 32-bit EH funclets. Matches
// spillCalleeSavedRegisters.
if (STI.is32Bit())