diff options
| author | Bill Wendling <isanbard@gmail.com> | 2009-02-21 01:07:26 +0000 |
|---|---|---|
| committer | Bill Wendling <isanbard@gmail.com> | 2009-02-21 01:07:26 +0000 |
| commit | 81ebf9a5783ca58b71fc0080ba6068f603103e76 (patch) | |
| tree | 97e906796ed0edb30fa560bbd24ecf3d70613102 /llvm/lib | |
| parent | 44c0f2aa88b9d6e32999522d2c4e533fd2ce5fc0 (diff) | |
| download | bcm5719-llvm-81ebf9a5783ca58b71fc0080ba6068f603103e76.tar.gz bcm5719-llvm-81ebf9a5783ca58b71fc0080ba6068f603103e76.zip | |
Make sure we don't dereference the .end() of the container.
llvm-svn: 65211
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Target/X86/X86RegisterInfo.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Target/X86/X86RegisterInfo.cpp b/llvm/lib/Target/X86/X86RegisterInfo.cpp index 82c15e7caf3..f4ada35e5fb 100644 --- a/llvm/lib/Target/X86/X86RegisterInfo.cpp +++ b/llvm/lib/Target/X86/X86RegisterInfo.cpp @@ -728,7 +728,8 @@ void X86RegisterInfo::emitPrologue(MachineFunction &MF) const { bool needsFrameMoves = (MMI && MMI->hasDebugInfo()) || !Fn->doesNotThrow() || UnwindTablesMandatory; - DebugLoc DL = MBBI->getDebugLoc(); + DebugLoc DL = (MBBI != MBB.end()) ? MBBI->getDebugLoc() : + DebugLoc::getUnknownLoc(); // Prepare for frame info. unsigned FrameLabelId = 0; |

