summaryrefslogtreecommitdiff
path: root/src/passes/FuncCastEmulation.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/passes/FuncCastEmulation.cpp')
-rw-r--r--src/passes/FuncCastEmulation.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/passes/FuncCastEmulation.cpp b/src/passes/FuncCastEmulation.cpp
index 9e455b0c8..a2f47ca90 100644
--- a/src/passes/FuncCastEmulation.cpp
+++ b/src/passes/FuncCastEmulation.cpp
@@ -193,13 +193,13 @@ private:
}
// The item in the table may be a function or a function import.
auto* func = module->getFunction(name);
- const std::vector<Type>& params = func->sig.params.expand();
Type type = func->sig.results;
Builder builder(*module);
std::vector<Expression*> callOperands;
- for (Index i = 0; i < params.size(); i++) {
+ Index i = 0;
+ for (auto& param : func->sig.params) {
callOperands.push_back(
- fromABI(builder.makeLocalGet(i, Type::i64), params[i], module));
+ fromABI(builder.makeLocalGet(i++, Type::i64), param, module));
}
auto* call = builder.makeCall(name, callOperands, type);
std::vector<Type> thunkParams;