xo-pyjit: fix: MachPipeline::codegen_toplevel() instead of codegen()

This commit is contained in:
Roland Conybeare 2024-07-05 13:52:31 -04:00
commit a0d748ef9f

View file

@ -156,7 +156,7 @@ namespace xo {
py::doc("write to console with state of all jit-owned dynamic libraries")) py::doc("write to console with state of all jit-owned dynamic libraries"))
.def("codegen", .def("codegen",
[](MachPipeline & jit, const rp<Expression> & expr) { [](MachPipeline & jit, const rp<Expression> & expr) {
return jit.codegen(expr.borrow()); return jit.codegen_toplevel(expr.borrow());
}, },
py::arg("x"), py::arg("x"),
py::doc("generate llvm (IR) code for Expression x"), py::doc("generate llvm (IR) code for Expression x"),