[llvm-commits] [llvm] r166834 - /llvm/trunk/lib/Target/ARM/ARMFrameLowering.cpp

Kaelyn Uhrain rikka at google.com
Fri Oct 26 16:28:41 PDT 2012


Author: rikka
Date: Fri Oct 26 18:28:41 2012
New Revision: 166834

URL: http://llvm.org/viewvc/llvm-project?rev=166834&view=rev
Log:
Avoid an unused-variable warning when asserts are disabled.

Modified:
    llvm/trunk/lib/Target/ARM/ARMFrameLowering.cpp

Modified: llvm/trunk/lib/Target/ARM/ARMFrameLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMFrameLowering.cpp?rev=166834&r1=166833&r2=166834&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMFrameLowering.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMFrameLowering.cpp Fri Oct 26 18:28:41 2012
@@ -349,7 +349,6 @@
   unsigned RetOpcode = MBBI->getOpcode();
   DebugLoc dl = MBBI->getDebugLoc();
   MachineFrameInfo *MFI = MF.getFrameInfo();
-  MachineRegisterInfo &MRI = MF.getRegInfo();
   ARMFunctionInfo *AFI = MF.getInfo<ARMFunctionInfo>();
   const TargetRegisterInfo *RegInfo = MF.getTarget().getRegisterInfo();
   const ARMBaseInstrInfo &TII =
@@ -402,7 +401,7 @@
           // This is bad, if an interrupt is taken after the mov, sp is in an
           // inconsistent state.
           // Use the first callee-saved register as a scratch register.
-          assert(MRI.isPhysRegUsed(ARM::R4) &&
+          assert(MF.getRegInfo().isPhysRegUsed(ARM::R4) &&
                  "No scratch register to restore SP from FP!");
           emitT2RegPlusImmediate(MBB, MBBI, dl, ARM::R4, FramePtr, -NumBytes,
                                  ARMCC::AL, 0, TII);





More information about the llvm-commits mailing list