<div dir="ltr">usually we just use "(void)var;" or roll the expression into the assert - any reason not to do one of those things here?<br><br>(also that condition "!(x < 0)" seems like it might be easier to read as "x >= 0")</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jun 14, 2016 at 11:53 PM, Sanjoy Das via llvm-commits <span dir="ltr"><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: sanjoy<br>
Date: Wed Jun 15 01:53:59 2016<br>
New Revision: 272760<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=272760&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=272760&view=rev</a><br>
Log:<br>
Fix unused variable warning; NFC<br>
<br>
TailCallReturnAddrDelta is used only in an assert, so put it under<br>
defined(NDEBUG).<br>
<br>
Modified:<br>
llvm/trunk/lib/Target/X86/X86FrameLowering.cpp<br>
<br>
Modified: llvm/trunk/lib/Target/X86/X86FrameLowering.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86FrameLowering.cpp?rev=272760&r1=272759&r2=272760&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86FrameLowering.cpp?rev=272760&r1=272759&r2=272760&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/Target/X86/X86FrameLowering.cpp (original)<br>
+++ llvm/trunk/lib/Target/X86/X86FrameLowering.cpp Wed Jun 15 01:53:59 2016<br>
@@ -1773,10 +1773,12 @@ X86FrameLowering::getFrameIndexReference<br>
const TargetFrameLowering *TFI = MF.getSubtarget().getFrameLowering();<br>
if (!AllowSPAdjustment && !TFI->hasReservedCallFrame(MF))<br>
return None;<br>
+#ifndef NDEBUG<br>
// We don't handle tail calls, and shouldn't be seeing them either.<br>
int TailCallReturnAddrDelta =<br>
MF.getInfo<X86MachineFunctionInfo>()->getTCReturnAddrDelta();<br>
assert(!(TailCallReturnAddrDelta < 0) && "we don't handle this case!");<br>
+#endif<br>
<br>
// Fill in FrameReg output argument.<br>
FrameReg = TRI->getStackRegister();<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div>