[llvm] [OCaml][NPM] Add OCaml bindings to new pass manager (PR #66421)

Josh Berdine via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 14 13:31:05 PDT 2023


================
@@ -0,0 +1,50 @@
+(* RUN: rm -rf %t && mkdir -p %t && cp %s %t/passbuilder.ml
+ * RUN: %ocamlc -g -w +A -package llvm.passbuilder -package llvm.all_backends -linkpkg %t/passbuilder.ml -o %t/executable
+ * RUN: %t/executable
+ * RUN: %ocamlopt -g -w +A -package llvm.passbuilder -package llvm.all_backends -linkpkg %t/passbuilder.ml -o %t/executable
+ * RUN: %t/executable
+ * XFAIL: vg_leak
+ *)
+
+let () = Llvm_all_backends.initialize ()
+
+(*===-- Fixture -----------------------------------------------------------===*)
+
+let context = Llvm.global_context ()
+
+let m = Llvm.create_module context "mymodule"
----------------
jberdine wrote:

It would perhaps be a more effective test if this loaded something like llvm/test/Other/new-pass-manager.ll rather than just using an empty module.

https://github.com/llvm/llvm-project/pull/66421


More information about the llvm-commits mailing list