diff --git a/mlir/examples/toy/Ch6/toyc.cpp b/mlir/examples/toy/Ch6/toyc.cpp index 5298c0bb52054c..0645bd40c1ba07 100644 --- a/mlir/examples/toy/Ch6/toyc.cpp +++ b/mlir/examples/toy/Ch6/toyc.cpp @@ -240,7 +240,7 @@ int runJit(mlir::ModuleOp module) { auto &engine = maybeEngine.get(); // Invoke the JIT-compiled function. - auto invocationResult = engine->invoke("main"); + auto invocationResult = engine->invokePacked("main"); if (invocationResult) { llvm::errs() << "JIT invocation failed\n"; return -1; diff --git a/mlir/examples/toy/Ch7/toyc.cpp b/mlir/examples/toy/Ch7/toyc.cpp index 8bace4a7397718..0f6d3876a5ad14 100644 --- a/mlir/examples/toy/Ch7/toyc.cpp +++ b/mlir/examples/toy/Ch7/toyc.cpp @@ -241,7 +241,7 @@ int runJit(mlir::ModuleOp module) { auto &engine = maybeEngine.get(); // Invoke the JIT-compiled function. - auto invocationResult = engine->invoke("main"); + auto invocationResult = engine->invokePacked("main"); if (invocationResult) { llvm::errs() << "JIT invocation failed\n"; return -1; diff --git a/mlir/test/Examples/Toy/Ch6/jit.toy b/mlir/test/Examples/Toy/Ch6/jit.toy new file mode 100644 index 00000000000000..250eb4e3307d32 --- /dev/null +++ b/mlir/test/Examples/Toy/Ch6/jit.toy @@ -0,0 +1,5 @@ +# RUN: toyc-ch6 -emit=jit %s + +def main() { + print([[1, 2], [3, 4]]); +} diff --git a/mlir/test/Examples/Toy/Ch7/jit.toy b/mlir/test/Examples/Toy/Ch7/jit.toy new file mode 100644 index 00000000000000..aaa898f77b3d5d --- /dev/null +++ b/mlir/test/Examples/Toy/Ch7/jit.toy @@ -0,0 +1,5 @@ +# RUN: toyc-ch7 -emit=jit %s + +def main() { + print([[1, 2], [3, 4]]); +}