diff options
Diffstat (limited to 'src/passes/Poppify.cpp')
-rw-r--r-- | src/passes/Poppify.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/passes/Poppify.cpp b/src/passes/Poppify.cpp index f787fb904..582753c4b 100644 --- a/src/passes/Poppify.cpp +++ b/src/passes/Poppify.cpp @@ -447,21 +447,22 @@ void Poppifier::poppify(Expression* expr) { class PoppifyFunctionsPass : public Pass { bool isFunctionParallel() override { return true; } - void - runOnFunction(PassRunner* runner, Module* module, Function* func) override { + void runOnFunction(Module* module, Function* func) override { if (func->profile != IRProfile::Poppy) { Poppifier(func, module).write(); func->profile = IRProfile::Poppy; } } - Pass* create() override { return new PoppifyFunctionsPass; } + std::unique_ptr<Pass> create() override { + return std::make_unique<PoppifyFunctionsPass>(); + } }; } // anonymous namespace class PoppifyPass : public Pass { - void run(PassRunner* runner, Module* module) { - PassRunner subRunner(runner); + void run(Module* module) { + PassRunner subRunner(getPassRunner()); subRunner.add(std::make_unique<PoppifyFunctionsPass>()); // TODO: Enable this once it handles Poppy blocks correctly // subRunner.add(std::make_unique<ReFinalize>()); |