aboutsummaryrefslogtreecommitdiff
path: root/bindings/ocaml/analysis/analysis_ocaml.c
diff options
context:
space:
mode:
authorErick Tryzelaar <idadesub@users.sourceforge.net>2008-03-31 16:22:09 +0000
committerErick Tryzelaar <idadesub@users.sourceforge.net>2008-03-31 16:22:09 +0000
commitd6d018589cf3de22bc5d0b2b229e37cdb6afca61 (patch)
tree3a39355c6721ff81bf64ee54d5dc679e3159c82d /bindings/ocaml/analysis/analysis_ocaml.c
parent86550b0a143c839956c0f3c1bca589c24ebcc3fb (diff)
Expose Function::viewCFG and Function::viewCFGOnly to bindings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48982 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'bindings/ocaml/analysis/analysis_ocaml.c')
-rw-r--r--bindings/ocaml/analysis/analysis_ocaml.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/bindings/ocaml/analysis/analysis_ocaml.c b/bindings/ocaml/analysis/analysis_ocaml.c
index e57c5a56d7..97167055f7 100644
--- a/bindings/ocaml/analysis/analysis_ocaml.c
+++ b/bindings/ocaml/analysis/analysis_ocaml.c
@@ -58,3 +58,15 @@ CAMLprim value llvm_assert_valid_function(LLVMValueRef Fn) {
LLVMVerifyFunction(Fn, LLVMAbortProcessAction);
return Val_unit;
}
+
+/* Llvm.llvalue -> unit */
+CAMLprim value llvm_view_function_cfg(LLVMValueRef Fn) {
+ LLVMViewFunctionCFG(Fn);
+ return Val_unit;
+}
+
+/* Llvm.llvalue -> unit */
+CAMLprim value llvm_view_function_cfg_only(LLVMValueRef Fn) {
+ LLVMViewFunctionCFGOnly(Fn);
+ return Val_unit;
+}