diff --git a/src/passes/ReorderLocals.cpp b/src/passes/ReorderLocals.cpp index a569a4ce8c4..900c4f9109e 100644 --- a/src/passes/ReorderLocals.cpp +++ b/src/passes/ReorderLocals.cpp @@ -116,11 +116,9 @@ struct ReorderLocals : public WalkerPass> { } // apply the renaming to AST nodes struct ReIndexer : public PostWalker { - Function* func; std::vector& oldToNew; - ReIndexer(Function* func, std::vector& oldToNew) - : func(func), oldToNew(oldToNew) {} + ReIndexer(std::vector& oldToNew) : oldToNew(oldToNew) {} void visitLocalGet(LocalGet* curr) { curr->index = oldToNew[curr->index]; @@ -130,7 +128,7 @@ struct ReorderLocals : public WalkerPass> { curr->index = oldToNew[curr->index]; } }; - ReIndexer reIndexer(curr, oldToNew); + ReIndexer reIndexer(oldToNew); reIndexer.walk(curr->body); // apply to the names auto oldLocalNames = curr->localNames;