Module Llvm_target

module Llvm_target: sig .. end
Target Information.

This interface provides an ocaml API for LLVM target information, the classes in the Target library.


module Endian: sig .. end
module DataLayout: sig .. end
val byte_order : DataLayout.t -> Endian.t
Returns the byte order of a target, either LLVMBigEndian or LLVMLittleEndian. See the method llvm::DataLayout::isLittleEndian.
val pointer_size : DataLayout.t -> int
Returns the pointer size in bytes for a target. See the method llvm::DataLayout::getPointerSize.
val intptr_type : DataLayout.t -> Llvm.lltype
Returns the integer type that is the same size as a pointer on a target. See the method llvm::DataLayout::getIntPtrType.
val size_in_bits : DataLayout.t -> Llvm.lltype -> Int64.t
Computes the size of a type in bytes for a target. See the method llvm::DataLayout::getTypeSizeInBits.
val store_size : DataLayout.t -> Llvm.lltype -> Int64.t
Computes the storage size of a type in bytes for a target. See the method llvm::DataLayout::getTypeStoreSize.
val abi_size : DataLayout.t -> Llvm.lltype -> Int64.t
Computes the ABI size of a type in bytes for a target. See the method llvm::DataLayout::getTypeAllocSize.
val abi_align : DataLayout.t -> Llvm.lltype -> int
Computes the ABI alignment of a type in bytes for a target. See the method llvm::DataLayout::getTypeABISize.
val stack_align : DataLayout.t -> Llvm.lltype -> int
Computes the call frame alignment of a type in bytes for a target. See the method llvm::DataLayout::getTypeABISize.
val preferred_align : DataLayout.t -> Llvm.lltype -> int
Computes the preferred alignment of a type in bytes for a target. See the method llvm::DataLayout::getTypeABISize.
val preferred_align_of_global : DataLayout.t -> Llvm.llvalue -> int
Computes the preferred alignment of a global variable in bytes for a target. See the method llvm::DataLayout::getPreferredAlignment.
val element_at_offset : DataLayout.t -> Llvm.lltype -> Int64.t -> int
Computes the structure element that contains the byte offset for a target. See the method llvm::StructLayout::getElementContainingOffset.
val offset_of_element : DataLayout.t -> Llvm.lltype -> int -> Int64.t
Computes the byte offset of the indexed struct element for a target. See the method llvm::StructLayout::getElementContainingOffset.