Source

ocaml-llvm-phantom / lib / type.ml

Full commit
(* llvm type algebra *)

open Llvm

(** phantom *)
type 'a typ = ('a, lltype) Phantom.t 
type 'a typs = ('a, lltype) Phantom.ts

(** descriptors *)

type void = unit
type i1 = [`int | `i1]
type i8 = [`int | `i8]
type i16 = [`int | `i16]
type i32 = [`int | `i32]
type i64 = [`int | `i64]
type 'a integer
type float_ = [`floating | `float]
type double = [`floating | `double]
type x86fp80 = [`floating | `x86fp80]
type fp128 = [`floating | `fp128]
type ppc_fp128 = [`floating | `ppc_fp128]
type dots
type 'a struct_ = [`members of 'a | `aligned_struct]
type 'a packed_struct = [`members of 'a | `packed_struct]
type ('a, 'sizetag) array_ = [`array of 'a * 'sizetag | `container of 'a]
type 'a pointer = [`pointer of 'a | `container of 'a]
type ('a, 'sizetag) vector = [`vector of 'a * 'sizetag | `container of 'a]
type label

(* void pointer is special in LLVM. It is illegal! *)
type void_pointer = i8 pointer

type address_space = int