Erase func-parameter declarations as well when inlining them

This commit is contained in:
baldurk
2015-07-30 01:09:51 +02:00
parent 7a71dd4172
commit 5a82b6be07
@@ -1088,6 +1088,8 @@ struct SPVModule
{
erase_item(funcops, storeBefore);
erase_item(vars, instr->op->arguments[a]);
// pass function parameter directly from where the store was coming from
instr->op->arguments[a] = storeBefore->op->arguments[1];
}
@@ -1159,6 +1161,8 @@ struct SPVModule
// it has been folded and should be skipped
ignore_items.insert(storeUse);
erase_item(vars, instr->op->arguments[a]);
// pass argument directly
instr->op->arguments[a] = storeUse->op->arguments[0];
}