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.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/passes/FuncCastEmulation.cpp b/src/passes/FuncCastEmulation.cpp
index 5e62ec9fc..80818907f 100644
--- a/src/passes/FuncCastEmulation.cpp
+++ b/src/passes/FuncCastEmulation.cpp
@@ -116,8 +116,8 @@ struct ParallelFuncCastEmulation
: public WalkerPass<PostWalker<ParallelFuncCastEmulation>> {
bool isFunctionParallel() override { return true; }
- Pass* create() override {
- return new ParallelFuncCastEmulation(ABIType, numParams);
+ std::unique_ptr<Pass> create() override {
+ return std::make_unique<ParallelFuncCastEmulation>(ABIType, numParams);
}
ParallelFuncCastEmulation(HeapType ABIType, Index numParams)
@@ -151,9 +151,9 @@ private:
};
struct FuncCastEmulation : public Pass {
- void run(PassRunner* runner, Module* module) override {
- Index numParams =
- std::stoul(runner->options.getArgumentOrDefault("max-func-params", "16"));
+ void run(Module* module) override {
+ Index numParams = std::stoul(
+ getPassOptions().getArgumentOrDefault("max-func-params", "16"));
// we just need the one ABI function type for all indirect calls
HeapType ABIType(
Signature(Type(std::vector<Type>(numParams, Type::i64)), Type::i64));
@@ -171,7 +171,7 @@ struct FuncCastEmulation : public Pass {
});
// update call_indirects
- ParallelFuncCastEmulation(ABIType, numParams).run(runner, module);
+ ParallelFuncCastEmulation(ABIType, numParams).run(getPassRunner(), module);
}
private: