From 6c5ddb159e06249aad3557538af3ba5fbbb33125 Mon Sep 17 00:00:00 2001 From: Sanjoy Das Date: Wed, 15 Jun 2016 07:27:04 +0000 Subject: [PATCH] Push a dependent computation into the assert that uses it; NFC ... instead of explicitly conditioning on NDEBUG. Also use an easier to read conditional expression. (Addresses post-commit review from David Blaikie.) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272762 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/X86/X86FrameLowering.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/Target/X86/X86FrameLowering.cpp b/lib/Target/X86/X86FrameLowering.cpp index 043e833bc78..2be00ca1707 100644 --- a/lib/Target/X86/X86FrameLowering.cpp +++ b/lib/Target/X86/X86FrameLowering.cpp @@ -1773,12 +1773,10 @@ X86FrameLowering::getFrameIndexReferenceFromSP(const MachineFunction &MF, const TargetFrameLowering *TFI = MF.getSubtarget().getFrameLowering(); if (!AllowSPAdjustment && !TFI->hasReservedCallFrame(MF)) return None; -#ifndef NDEBUG + // We don't handle tail calls, and shouldn't be seeing them either. - int TailCallReturnAddrDelta = - MF.getInfo()->getTCReturnAddrDelta(); - assert(!(TailCallReturnAddrDelta < 0) && "we don't handle this case!"); -#endif + assert(MF.getInfo()->getTCReturnAddrDelta() >= 0 && + "we don't handle this case!"); // Fill in FrameReg output argument. FrameReg = TRI->getStackRegister(); -- 2.50.1