[llvm-commits] [llvm] r65211 - /llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp

Bill Wendling isanbard at gmail.com
Fri Feb 20 17:07:26 PST 2009


Author: void
Date: Fri Feb 20 19:07:26 2009
New Revision: 65211

URL: http://llvm.org/viewvc/llvm-project?rev=65211&view=rev
Log:
Make sure we don't dereference the .end() of the container.

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=65211&r1=65210&r2=65211&view=diff

==============================================================================
--- llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp Fri Feb 20 19:07:26 2009
@@ -728,7 +728,8 @@
   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;





More information about the llvm-commits mailing list