[OCaml] Add an ocamlfind package llvm.all_backends.
[oota-llvm.git] / bindings / ocaml / analysis / llvm_analysis.mli
index a97bd7e9e26f523071f831c97cdd2aaf134629fc..1a0af02b387849f1e1ace224525038d5f418334b 100644 (file)
@@ -1,4 +1,4 @@
-(*===-- llvm_analysis.mli - LLVM Ocaml Interface ----------------*- C++ -*-===*
+(*===-- llvm_analysis.mli - LLVM OCaml Interface ----------------*- C++ -*-===*
  *
  *                     The LLVM Compiler Infrastructure
  *
@@ -9,7 +9,7 @@
 
 (** Intermediate representation analysis.
 
-    This interface provides an ocaml API for LLVM IR analyses, the classes in
+    This interface provides an OCaml API for LLVM IR analyses, the classes in
     the Analysis library. *)
 
 (** [verify_module m] returns [None] if the module [m] is valid, and
@@ -33,3 +33,14 @@ external assert_valid_module : Llvm.llmodule -> unit
     [llvm::verifyFunction]. *)
 external assert_valid_function : Llvm.llvalue -> unit
                                = "llvm_assert_valid_function"
+
+(** [view_function_cfg f] opens up a ghostscript window displaying the CFG of
+    the current function with the code for each basic block inside.
+    See [llvm::Function::viewCFG]. *)
+external view_function_cfg : Llvm.llvalue -> unit = "llvm_view_function_cfg"
+
+(** [view_function_cfg_only f] works just like [view_function_cfg], but does not
+    include the contents of basic blocks into the nodes.
+    See [llvm::Function::viewCFGOnly]. *)
+external view_function_cfg_only : Llvm.llvalue -> unit
+                                = "llvm_view_function_cfg_only"