OSDN Git Service

Try to fix a bot failure due to a variable used only in an assert.
authorPhilip Reames <listmail@philipreames.com>
Mon, 1 Dec 2014 23:27:45 +0000 (23:27 +0000)
committerPhilip Reames <listmail@philipreames.com>
Mon, 1 Dec 2014 23:27:45 +0000 (23:27 +0000)
Specifically, bot lld-x86_64-darwin13.  Resulting from change 223085.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223092 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86FrameLowering.cpp

index 278e4f9..f8ada8d 100644 (file)
@@ -1137,13 +1137,13 @@ int X86FrameLowering::getFrameIndexReference(const MachineFunction &MF, int FI,
 
 // Simplified from getFrameIndexOffset keeping only StackPointer cases
 int X86FrameLowering::getFrameIndexOffsetFromSP(const MachineFunction &MF, int FI) const {
-  const X86RegisterInfo *RegInfo =
-    static_cast<const X86RegisterInfo*>(MF.getSubtarget().getRegisterInfo());
   const MachineFrameInfo *MFI = MF.getFrameInfo();
-  const uint64_t StackSize = MFI->getStackSize(); //not including dynamic realign
-
+  // Does not include any dynamic realign.
+  const uint64_t StackSize = MFI->getStackSize(); 
   {
 #ifndef NDEBUG
+    const X86RegisterInfo *RegInfo =
+      static_cast<const X86RegisterInfo*>(MF.getSubtarget().getRegisterInfo());
     // Note: LLVM arranges the stack as:
     // Args > Saved RetPC (<--FP) > CSRs > dynamic alignment (<--BP)
     //      > "Stack Slots" (<--SP)