This patch cleans up the OCaml bindings so that they format nicely with
[oota-llvm.git] / bindings / ocaml / analysis / llvm_analysis.mli
1 (*===-- llvm_analysis.mli - LLVM Ocaml Interface ----------------*- C++ -*-===*
2  *
3  *                     The LLVM Compiler Infrastructure
4  *
5  * This file is distributed under the University of Illinois Open Source
6  * License. See LICENSE.TXT for details.
7  *
8  *===----------------------------------------------------------------------===*)
9
10 (** Intermediate representation analysis.
11
12     This interface provides an ocaml API for LLVM IR analyses, the classes in
13     the Analysis library. *)
14
15 (** [verify_module m] returns [None] if the module [m] is valid, and
16     [Some reason] if it is invalid. [reason] is a string containing a
17     human-readable validation report. See [llvm::verifyModule]. *)
18 external verify_module : Llvm.llmodule -> string option = "llvm_verify_module"
19
20 (** [verify_function f] returns [None] if the function [f] is valid, and
21     [Some reason] if it is invalid. [reason] is a string containing a
22     human-readable validation report. See [llvm::verifyFunction]. *)
23 external verify_function : Llvm.llvalue -> bool = "llvm_verify_function"
24
25 (** [verify_module m] returns if the module [m] is valid, but prints a
26     validation report to [stderr] and aborts the program if it is invalid. See
27     [llvm::verifyModule]. *)
28 external assert_valid_module : Llvm.llmodule -> unit
29                              = "llvm_assert_valid_module"
30
31 (** [verify_function f] returns if the function [f] is valid, but prints a
32     validation report to [stderr] and aborts the program if it is invalid. See
33     [llvm::verifyFunction]. *)
34 external assert_valid_function : Llvm.llvalue -> unit
35                                = "llvm_assert_valid_function"