<div dir="ltr">The usual way to deal with unused values (when they're only used in an assert) in LLVM is with a (void)X; statement near the assertion - so it's easier to track them together.<br><br>Alternatively, is there a reason the assertion couldn't move up two lines, before the increments as needed? (or does the increment cause a mutation of OutMIs.size in some indirect way?)</div><br><div class="gmail_quote"><div dir="ltr">On Wed, Jul 5, 2017 at 8:37 AM Daniel Sanders via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: dsanders<br>
Date: Wed Jul  5 03:16:48 2017<br>
New Revision: 307138<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=307138&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=307138&view=rev</a><br>
Log:<br>
[globalisel][tablegen] Fix an unused variable warning in release builds after r307133<br>
<br>
<br>
Modified:<br>
    llvm/trunk/lib/CodeGen/GlobalISel/InstructionSelector.cpp<br>
<br>
Modified: llvm/trunk/lib/CodeGen/GlobalISel/InstructionSelector.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/GlobalISel/InstructionSelector.cpp?rev=307138&r1=307137&r2=307138&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/GlobalISel/InstructionSelector.cpp?rev=307138&r1=307137&r2=307138&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/CodeGen/GlobalISel/InstructionSelector.cpp (original)<br>
+++ llvm/trunk/lib/CodeGen/GlobalISel/InstructionSelector.cpp Wed Jul  5 03:16:48 2017<br>
@@ -59,7 +59,7 @@ void InstructionSelector::executeEmitTab<br>
       break;<br>
     }<br>
     case GIR_BuildMI: {<br>
-      int64_t InsnID = *Command++;<br>
+      int64_t InsnID LLVM_ATTRIBUTE_UNUSED = *Command++;<br>
       int64_t Opcode = *Command++;<br>
       assert((size_t)InsnID == OutMIs.size() &&<br>
              "Expected to store MIs in order");<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">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>