Fix docstring for ocaml binding's const_float.
[oota-llvm.git] / bindings / ocaml / llvm / llvm.mli
index 421c20cba96187fe7a82c019cd895ab81436a675..8b8cb7f41f47950a7dd001819387f08c8eb6bc6a 100644 (file)
@@ -68,6 +68,7 @@ module TypeKind : sig
   | Pointer
   | Opaque
   | Vector
+  | Metadata
 end
 
 (** The linkage of a global value, accessed with {!linkage} and
@@ -469,7 +470,7 @@ external const_of_int64 : lltype -> Int64.t -> bool -> llvalue
                         = "llvm_const_of_int64"
 
 (** [const_float ty n] returns the floating point constant of type [ty] and
-    value [n]. See the method [llvm::ConstantInt::get]. *)
+    value [n]. See the method [llvm::ConstantFP::get]. *)
 external const_float : lltype -> float -> llvalue = "llvm_const_float"
 
 
@@ -514,9 +515,15 @@ external const_vector : llvalue array -> llvalue = "llvm_const_vector"
 
 (** {7 Constant expressions} *)
 
+(** [align_of ty] returns the alignof constant for the type [ty]. This is
+    equivalent to [const_ptrtoint (const_gep (const_null (pointer_type {i8,ty}))
+    (const_int i32_type 0) (const_int i32_type 1)) i32_type], but considerably
+    more readable.  See the method [llvm::ConstantExpr::getAlignOf]. *)
+external align_of : lltype -> llvalue = "LLVMAlignOf"
+
 (** [size_of ty] returns the sizeof constant for the type [ty]. This is
     equivalent to [const_ptrtoint (const_gep (const_null (pointer_type ty))
-    (const_int i64_type 1)) i64_type], but considerably more readable.
+    (const_int i32_type 1)) i64_type], but considerably more readable.
     See the method [llvm::ConstantExpr::getSizeOf]. *)
 external size_of : lltype -> llvalue = "LLVMSizeOf"