DebugInfo: Require a DebugLoc in DIBuilder::insertDeclare()
[oota-llvm.git] / bindings / ocaml / analysis / llvm_analysis.mli
index a97bd7e9e26f523071f831c97cdd2aaf134629fc..03197cd41be63b0dcbd099e5b79261785f415fab 100644 (file)
@@ -1,4 +1,4 @@
-(*===-- llvm_analysis.mli - LLVM Ocaml Interface ----------------*- C++ -*-===*
+(*===-- llvm_analysis.mli - LLVM OCaml Interface --------------*- OCaml -*-===*
  *
  *                     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"