Expose Function::viewCFG and Function::viewCFGOnly to bindings.
[oota-llvm.git] / bindings / ocaml / analysis / llvm_analysis.mli
index a97bd7e9e26f523071f831c97cdd2aaf134629fc..793f482e3c6c7837d86123b2007f5a85d95c6b5d 100644 (file)
@@ -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"