Bug 1282795 - Make a variable DebugOnly, and extract a side effect on that variable from an assertion expression to avoid a clang compiler warning when a side-effectful expression appears in unevaluated context. r=froydnj

--HG--
extra : rebase_source : c45b2b2fff55457383b8da86b9b597a5fb60b587
This commit is contained in:
Jeff Walden 2016-06-28 17:13:22 +01:00
parent e20f0f4551
commit c98db2b696

View File

@ -2866,9 +2866,10 @@ jit::AssertExtendedGraphCoherency(MIRGraph& graph, bool underValueNumberer)
AssertDominatorTree(graph); AssertDominatorTree(graph);
uint32_t idx = 0; DebugOnly<uint32_t> idx = 0;
for (MBasicBlockIterator block(graph.begin()); block != graph.end(); block++) { for (MBasicBlockIterator block(graph.begin()); block != graph.end(); block++) {
MOZ_ASSERT(block->id() == idx++); MOZ_ASSERT(block->id() == idx);
++idx;
// No critical edges: // No critical edges:
if (block->numSuccessors() > 1) if (block->numSuccessors() > 1)