summaryrefslogtreecommitdiffstats
path: root/contrib/llvm/bindings/ocaml/analysis
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2010-10-11 17:22:16 +0000
committerdim <dim@FreeBSD.org>2010-10-11 17:22:16 +0000
commit1fc65a65fe54635d0e564559ba5a7b8a8a42d4d6 (patch)
treede75a464c5dac7eceb2dbbad8b4d4e1479d79e08 /contrib/llvm/bindings/ocaml/analysis
parentf4f7191cd223adebacee3fad260ed60935be9cb9 (diff)
downloadFreeBSD-src-1fc65a65fe54635d0e564559ba5a7b8a8a42d4d6.zip
FreeBSD-src-1fc65a65fe54635d0e564559ba5a7b8a8a42d4d6.tar.gz
Remove more unneeded files and directories from contrib/llvm. This
still allows us to build tblgen and clang, and further reduces the footprint in the tree. Approved by: rpaulo (mentor)
Diffstat (limited to 'contrib/llvm/bindings/ocaml/analysis')
-rw-r--r--contrib/llvm/bindings/ocaml/analysis/Makefile19
-rw-r--r--contrib/llvm/bindings/ocaml/analysis/analysis_ocaml.c72
-rw-r--r--contrib/llvm/bindings/ocaml/analysis/llvm_analysis.ml22
-rw-r--r--contrib/llvm/bindings/ocaml/analysis/llvm_analysis.mli46
4 files changed, 0 insertions, 159 deletions
diff --git a/contrib/llvm/bindings/ocaml/analysis/Makefile b/contrib/llvm/bindings/ocaml/analysis/Makefile
deleted file mode 100644
index cbfcb24..0000000
--- a/contrib/llvm/bindings/ocaml/analysis/Makefile
+++ /dev/null
@@ -1,19 +0,0 @@
-##===- bindings/ocaml/analysis/Makefile --------------------*- Makefile -*-===##
-#
-# The LLVM Compiler Infrastructure
-#
-# This file is distributed under the University of Illinois Open Source
-# License. See LICENSE.TXT for details.
-#
-##===----------------------------------------------------------------------===##
-#
-# This is the makefile for the Objective Caml Llvm_analysis interface.
-#
-##===----------------------------------------------------------------------===##
-
-LEVEL := ../../..
-LIBRARYNAME := llvm_analysis
-UsedComponents := analysis
-UsedOcamlInterfaces := llvm
-
-include ../Makefile.ocaml
diff --git a/contrib/llvm/bindings/ocaml/analysis/analysis_ocaml.c b/contrib/llvm/bindings/ocaml/analysis/analysis_ocaml.c
deleted file mode 100644
index 9716705..0000000
--- a/contrib/llvm/bindings/ocaml/analysis/analysis_ocaml.c
+++ /dev/null
@@ -1,72 +0,0 @@
-/*===-- analysis_ocaml.c - LLVM Ocaml Glue ----------------------*- C++ -*-===*\
-|* *|
-|* The LLVM Compiler Infrastructure *|
-|* *|
-|* This file is distributed under the University of Illinois Open Source *|
-|* License. See LICENSE.TXT for details. *|
-|* *|
-|*===----------------------------------------------------------------------===*|
-|* *|
-|* This file glues LLVM's ocaml interface to its C interface. These functions *|
-|* are by and large transparent wrappers to the corresponding C functions. *|
-|* *|
-|* Note that these functions intentionally take liberties with the CAMLparamX *|
-|* macros, since most of the parameters are not GC heap objects. *|
-|* *|
-\*===----------------------------------------------------------------------===*/
-
-#include "llvm-c/Analysis.h"
-#include "caml/alloc.h"
-#include "caml/mlvalues.h"
-#include "caml/memory.h"
-
-
-/* Llvm.llmodule -> string option */
-CAMLprim value llvm_verify_module(LLVMModuleRef M) {
- CAMLparam0();
- CAMLlocal2(String, Option);
-
- char *Message;
- int Result = LLVMVerifyModule(M, LLVMReturnStatusAction, &Message);
-
- if (0 == Result) {
- Option = Val_int(0);
- } else {
- Option = alloc(1, 0);
- String = copy_string(Message);
- Store_field(Option, 0, String);
- }
-
- LLVMDisposeMessage(Message);
-
- CAMLreturn(Option);
-}
-
-/* Llvm.llvalue -> bool */
-CAMLprim value llvm_verify_function(LLVMValueRef Fn) {
- return Val_bool(LLVMVerifyFunction(Fn, LLVMReturnStatusAction) == 0);
-}
-
-/* Llvm.llmodule -> unit */
-CAMLprim value llvm_assert_valid_module(LLVMModuleRef M) {
- LLVMVerifyModule(M, LLVMAbortProcessAction, 0);
- return Val_unit;
-}
-
-/* Llvm.llvalue -> unit */
-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;
-}
diff --git a/contrib/llvm/bindings/ocaml/analysis/llvm_analysis.ml b/contrib/llvm/bindings/ocaml/analysis/llvm_analysis.ml
deleted file mode 100644
index fc4d203..0000000
--- a/contrib/llvm/bindings/ocaml/analysis/llvm_analysis.ml
+++ /dev/null
@@ -1,22 +0,0 @@
-(*===-- llvm_analysis.ml - LLVM Ocaml Interface -----------------*- C++ -*-===*
- *
- * The LLVM Compiler Infrastructure
- *
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
- *
- *===----------------------------------------------------------------------===*)
-
-
-external verify_module : Llvm.llmodule -> string option = "llvm_verify_module"
-
-external verify_function : Llvm.llvalue -> bool = "llvm_verify_function"
-
-external assert_valid_module : Llvm.llmodule -> unit
- = "llvm_assert_valid_module"
-
-external assert_valid_function : Llvm.llvalue -> unit
- = "llvm_assert_valid_function"
-external view_function_cfg : Llvm.llvalue -> unit = "llvm_view_function_cfg"
-external view_function_cfg_only : Llvm.llvalue -> unit
- = "llvm_view_function_cfg_only"
diff --git a/contrib/llvm/bindings/ocaml/analysis/llvm_analysis.mli b/contrib/llvm/bindings/ocaml/analysis/llvm_analysis.mli
deleted file mode 100644
index 793f482..0000000
--- a/contrib/llvm/bindings/ocaml/analysis/llvm_analysis.mli
+++ /dev/null
@@ -1,46 +0,0 @@
-(*===-- llvm_analysis.mli - LLVM Ocaml Interface ----------------*- C++ -*-===*
- *
- * The LLVM Compiler Infrastructure
- *
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
- *
- *===----------------------------------------------------------------------===*)
-
-(** Intermediate representation analysis.
-
- 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
- [Some reason] if it is invalid. [reason] is a string containing a
- human-readable validation report. See [llvm::verifyModule]. *)
-external verify_module : Llvm.llmodule -> string option = "llvm_verify_module"
-
-(** [verify_function f] returns [None] if the function [f] is valid, and
- [Some reason] if it is invalid. [reason] is a string containing a
- human-readable validation report. See [llvm::verifyFunction]. *)
-external verify_function : Llvm.llvalue -> bool = "llvm_verify_function"
-
-(** [verify_module m] returns if the module [m] is valid, but prints a
- validation report to [stderr] and aborts the program if it is invalid. See
- [llvm::verifyModule]. *)
-external assert_valid_module : Llvm.llmodule -> unit
- = "llvm_assert_valid_module"
-
-(** [verify_function f] returns if the function [f] is valid, but prints a
- validation report to [stderr] and aborts the program if it is invalid. See
- [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"
OpenPOWER on IntegriCloud