X86: Fix another dereferenced end() iterator after r278532

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278577 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Hans Wennborg 2016-08-12 23:35:59 +00:00
parent e96662ea81
commit be1a4e1ef5

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())