]> granicus.if.org Git - llvm/commitdiff
Move a variable into the assert where it's used - fixes a -Asserts
authorEric Christopher <echristo@gmail.com>
Thu, 12 Mar 2015 23:13:03 +0000 (23:13 +0000)
committerEric Christopher <echristo@gmail.com>
Thu, 12 Mar 2015 23:13:03 +0000 (23:13 +0000)
build warning/error.

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

lib/Target/ARM/ThumbRegisterInfo.cpp

index e70b6172b46d3588e2856b2761e50e50cf8049b1..b5f9d7e38f272dff939e4f9a3ce47000f45d52bc 100644 (file)
@@ -355,8 +355,7 @@ bool ThumbRegisterInfo::rewriteFrameIndex(MachineBasicBlock::iterator II,
                                           const ARMBaseInstrInfo &TII) const {
   MachineInstr &MI = *II;
   MachineBasicBlock &MBB = *MI.getParent();
-  const MachineFunction &MF = *MBB.getParent();
-  assert(MF.getSubtarget<ARMSubtarget>().isThumb1Only() &&
+  assert(MBB.getParent()->getSubtarget<ARMSubtarget>().isThumb1Only() &&
          "This isn't needed for thumb2!");
   DebugLoc dl = MI.getDebugLoc();
   MachineInstrBuilder MIB(*MBB.getParent(), &MI);