[llvm-commits] [llvm] r112363 - in /llvm/trunk/bindings/ocaml/llvm: llvm.ml llvm.mli llvm_ocaml.c
Benjamin Kramer
benny.kra at googlemail.com
Sat Aug 28 02:47:42 PDT 2010
Author: d0k
Date: Sat Aug 28 04:47:42 2010
New Revision: 112363
URL: http://llvm.org/viewvc/llvm-project?rev=112363&view=rev
Log:
Remove unions from the ocaml bindings.
Modified:
llvm/trunk/bindings/ocaml/llvm/llvm.ml
llvm/trunk/bindings/ocaml/llvm/llvm.mli
llvm/trunk/bindings/ocaml/llvm/llvm_ocaml.c
Modified: llvm/trunk/bindings/ocaml/llvm/llvm.ml
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/bindings/ocaml/llvm/llvm.ml?rev=112363&r1=112362&r2=112363&view=diff
==============================================================================
--- llvm/trunk/bindings/ocaml/llvm/llvm.ml (original)
+++ llvm/trunk/bindings/ocaml/llvm/llvm.ml Sat Aug 28 04:47:42 2010
@@ -35,7 +35,6 @@
| Opaque
| Vector
| Metadata
- | Union
end
module Linkage = struct
@@ -210,11 +209,6 @@
= "llvm_struct_element_types"
external is_packed : lltype -> bool = "llvm_is_packed"
-(*--... Operations on union types ..........................................--*)
-external union_type : llcontext -> lltype array -> lltype = "llvm_union_type"
-external union_element_types : lltype -> lltype array
- = "llvm_union_element_types"
-
(*--... Operations on pointer, vector, and array types .....................--*)
external array_type : lltype -> int -> lltype = "llvm_array_type"
external pointer_type : lltype -> lltype = "llvm_pointer_type"
@@ -321,7 +315,6 @@
external const_packed_struct : llcontext -> llvalue array -> llvalue
= "llvm_const_packed_struct"
external const_vector : llvalue array -> llvalue = "llvm_const_vector"
-external const_union : lltype -> llvalue -> llvalue = "LLVMConstUnion"
(*--... Constant expressions ...............................................--*)
external align_of : lltype -> llvalue = "LLVMAlignOf"
@@ -1052,9 +1045,6 @@
if is_packed ty
then "<" ^ s ^ ">"
else s
- | TypeKind.Union -> "union { " ^ (concat2 ", " (
- Array.map string_of_lltype (union_element_types ty)
- )) ^ " }"
| TypeKind.Array -> "[" ^ (string_of_int (array_length ty)) ^
" x " ^ (string_of_lltype (element_type ty)) ^ "]"
| TypeKind.Vector -> "<" ^ (string_of_int (vector_size ty)) ^
Modified: llvm/trunk/bindings/ocaml/llvm/llvm.mli
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/bindings/ocaml/llvm/llvm.mli?rev=112363&r1=112362&r2=112363&view=diff
==============================================================================
--- llvm/trunk/bindings/ocaml/llvm/llvm.mli (original)
+++ llvm/trunk/bindings/ocaml/llvm/llvm.mli Sat Aug 28 04:47:42 2010
@@ -72,7 +72,6 @@
| Opaque
| Vector
| Metadata
- | Union
end
(** The linkage of a global value, accessed with {!linkage} and
@@ -408,19 +407,6 @@
external is_packed : lltype -> bool = "llvm_is_packed"
-(** {7 Operations on union types} *)
-
-(** [union_type context tys] returns the union type in the context [context]
- containing the types in the array [tys]. See the method
- [llvm::UnionType::get] *)
-external union_type : llcontext -> lltype array -> lltype = "llvm_union_type"
-
-(** [union_element_types uty] returns the constituent types of the union type
- [uty]. See the method [llvm::UnionType::getElementType]. *)
-external union_element_types : lltype -> lltype array
- = "llvm_union_element_types"
-
-
(** {7 Operations on pointer, vector, and array types} *)
(** [array_type ty n] returns the array type containing [n] elements of type
@@ -697,10 +683,6 @@
values [elts]. See the method [llvm::ConstantVector::get]. *)
external const_vector : llvalue array -> llvalue = "llvm_const_vector"
-(** [const_union ty v] returns the union constant of type [union_type tys] and
- containing the value [v]. See the method [llvm::ConstantUnion::get]. *)
-external const_union : lltype -> llvalue -> llvalue = "LLVMConstUnion"
-
(** {7 Constant expressions} *)
Modified: llvm/trunk/bindings/ocaml/llvm/llvm_ocaml.c
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/bindings/ocaml/llvm/llvm_ocaml.c?rev=112363&r1=112362&r2=112363&view=diff
==============================================================================
--- llvm/trunk/bindings/ocaml/llvm/llvm_ocaml.c (original)
+++ llvm/trunk/bindings/ocaml/llvm/llvm_ocaml.c Sat Aug 28 04:47:42 2010
@@ -318,21 +318,6 @@
return Val_bool(LLVMIsPackedStruct(StructTy));
}
-/*--... Operations on union types ..........................................--*/
-
-/* llcontext -> lltype array -> lltype */
-CAMLprim LLVMTypeRef llvm_union_type(LLVMContextRef C, value ElementTypes) {
- return LLVMUnionTypeInContext(C, (LLVMTypeRef *) ElementTypes,
- Wosize_val(ElementTypes));
-}
-
-/* lltype -> lltype array */
-CAMLprim value llvm_union_element_types(LLVMTypeRef UnionTy) {
- value Tys = alloc(LLVMCountUnionElementTypes(UnionTy), 0);
- LLVMGetUnionElementTypes(UnionTy, (LLVMTypeRef *) Tys);
- return Tys;
-}
-
/*--... Operations on array, pointer, and vector types .....................--*/
/* lltype -> int -> lltype */
More information about the llvm-commits
mailing list