Capturing value table by reference in local redundancy elim

This commit is contained in:
Alan Baker 2018-01-16 16:27:13 -05:00 committed by David Neto
parent ae6daeed99
commit 3a0eb44da3

View File

@ -43,7 +43,7 @@ bool LocalRedundancyEliminationPass::EliminateRedundanciesInBB(
std::map<uint32_t, uint32_t>* value_to_ids) { std::map<uint32_t, uint32_t>* value_to_ids) {
bool modified = false; bool modified = false;
auto func = [this, vnTable, &modified, value_to_ids](ir::Instruction* inst) { auto func = [this, &vnTable, &modified, value_to_ids](ir::Instruction* inst) {
if (inst->result_id() == 0) { if (inst->result_id() == 0) {
return; return;
} }