[llvm-commits] [llvm] r65213 - /llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp
Bill Wendling
isanbard at gmail.com
Fri Feb 20 17:11:36 PST 2009
Author: void
Date: Fri Feb 20 19:11:36 2009
New Revision: 65213
URL: http://llvm.org/viewvc/llvm-project?rev=65213&view=rev
Log:
Make sure this doesn't access .end() too.
Modified:
llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp
Modified: llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp?rev=65213&r1=65212&r2=65213&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp Fri Feb 20 19:11:36 2009
@@ -542,7 +542,8 @@
(Is64Bit ? X86::ADD64ri8 : X86::ADD32ri8) :
(Is64Bit ? X86::ADD64ri32 : X86::ADD32ri));
uint64_t Chunk = (1LL << 31) - 1;
- DebugLoc DL = MBBI->getDebugLoc();
+ DebugLoc DL = (MBBI != MBB.end() ? MBBI->getDebugLoc() :
+ DebugLoc::getUnknownLoc());
while (Offset) {
uint64_t ThisVal = (Offset > Chunk) ? Chunk : Offset;
@@ -728,8 +729,8 @@
bool needsFrameMoves = (MMI && MMI->hasDebugInfo()) ||
!Fn->doesNotThrow() ||
UnwindTablesMandatory;
- DebugLoc DL = (MBBI != MBB.end()) ? MBBI->getDebugLoc() :
- DebugLoc::getUnknownLoc();
+ DebugLoc DL = (MBBI != MBB.end() ? MBBI->getDebugLoc() :
+ DebugLoc::getUnknownLoc());
// Prepare for frame info.
unsigned FrameLabelId = 0;
More information about the llvm-commits
mailing list