From 4925653555942acbafbb936ccf81cc6e5b384868 Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Fri, 2 Mar 2018 17:39:20 +0000 Subject: [PATCH] [ARM] Fold variable into assert. Avoids unused variable warnings in Release mode. llvm-svn: 326592 --- llvm/lib/Target/ARM/ThumbRegisterInfo.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/llvm/lib/Target/ARM/ThumbRegisterInfo.cpp b/llvm/lib/Target/ARM/ThumbRegisterInfo.cpp index 2f3b0b4..5e0818b 100644 --- a/llvm/lib/Target/ARM/ThumbRegisterInfo.cpp +++ b/llvm/lib/Target/ARM/ThumbRegisterInfo.cpp @@ -517,7 +517,6 @@ void ThumbRegisterInfo::eliminateFrameIndex(MachineBasicBlock::iterator II, unsigned VReg = 0; const ARMBaseInstrInfo &TII = *STI.getInstrInfo(); - ARMFunctionInfo *AFI = MF.getInfo(); DebugLoc dl = MI.getDebugLoc(); MachineInstrBuilder MIB(*MBB.getParent(), &MI); @@ -549,7 +548,7 @@ void ThumbRegisterInfo::eliminateFrameIndex(MachineBasicBlock::iterator II, } // Modify MI as necessary to handle as much of 'Offset' as possible - assert(AFI->isThumbFunction() && + assert(MF.getInfo()->isThumbFunction() && "This eliminateFrameIndex only supports Thumb1!"); if (rewriteFrameIndex(MI, FIOperandNum, FrameReg, Offset, TII)) return; -- 2.7.4