Changeset View
Changeset View
Standalone View
Standalone View
test/Bindings/OCaml/diagnostic_handler.ml
(* RUN: cp %s %T/diagnostic_handler.ml | (* RUN: rm -rf %t && mkdir -p %t && cp %s %t/diagnostic_handler.ml | ||||
* RUN: %ocamlc -g -w +A -package llvm.bitreader -linkpkg %T/diagnostic_handler.ml -o %t | * RUN: %ocamlc -g -w +A -package llvm.bitreader -linkpkg %t/diagnostic_handler.ml -o %t/executable | ||||
* RUN: %t %t.bc | FileCheck %s | * RUN: %t/executable %t/bitcode.bc | FileCheck %s | ||||
* RUN: %ocamlopt -g -w +A -package llvm.bitreader -linkpkg %T/diagnostic_handler.ml -o %t | * RUN: %ocamlopt -g -w +A -package llvm.bitreader -linkpkg %t/diagnostic_handler.ml -o %t/executable | ||||
* RUN: %t %t.bc | FileCheck %s | * RUN: %t/executable %t/bitcode.bc | FileCheck %s | ||||
* XFAIL: vg_leak | * XFAIL: vg_leak | ||||
*) | *) | ||||
let context = Llvm.global_context () | let context = Llvm.global_context () | ||||
let diagnostic_handler d = | let diagnostic_handler d = | ||||
Printf.printf | Printf.printf | ||||
"Diagnostic handler called: %s\n" (Llvm.Diagnostic.description d); | "Diagnostic handler called: %s\n" (Llvm.Diagnostic.description d); | ||||
Show All 35 Lines |