summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86/X86FrameLowering.cpp
diff options
context:
space:
mode:
authorSanjoy Das <sanjoy@playingwithpointers.com>2016-06-15 07:27:04 +0000
committerSanjoy Das <sanjoy@playingwithpointers.com>2016-06-15 07:27:04 +0000
commit4f7a86c74d2378a8f0fc53c703dd6704c5a54913 (patch)
tree665af534eccb8d18cb377f195add24044ba89f58 /llvm/lib/Target/X86/X86FrameLowering.cpp
parenta60925983240d6051f41bea69e7d154c576beb0d (diff)
downloadbcm5719-llvm-4f7a86c74d2378a8f0fc53c703dd6704c5a54913.tar.gz
bcm5719-llvm-4f7a86c74d2378a8f0fc53c703dd6704c5a54913.zip
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.) llvm-svn: 272762
Diffstat (limited to 'llvm/lib/Target/X86/X86FrameLowering.cpp')
-rw-r--r--llvm/lib/Target/X86/X86FrameLowering.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/llvm/lib/Target/X86/X86FrameLowering.cpp b/llvm/lib/Target/X86/X86FrameLowering.cpp
index 043e833bc78..2be00ca1707 100644
--- a/llvm/lib/Target/X86/X86FrameLowering.cpp
+++ b/llvm/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<X86MachineFunctionInfo>()->getTCReturnAddrDelta();
- assert(!(TailCallReturnAddrDelta < 0) && "we don't handle this case!");
-#endif
+ assert(MF.getInfo<X86MachineFunctionInfo>()->getTCReturnAddrDelta() >= 0 &&
+ "we don't handle this case!");
// Fill in FrameReg output argument.
FrameReg = TRI->getStackRegister();
OpenPOWER on IntegriCloud