diff options
author | Torok Edwin <edwintorok@gmail.com> | 2011-10-14 20:38:24 +0000 |
---|---|---|
committer | Torok Edwin <edwintorok@gmail.com> | 2011-10-14 20:38:24 +0000 |
commit | 0be167bab219cb178f7a6e91186c700ad48aa047 (patch) | |
tree | 2c8b51e25e2c3c9b5931d245629d758885bef574 /bindings/ocaml/llvm/llvm.mli | |
parent | 8da43bf60e8c27fe69033d73d440ea147d72b06d (diff) | |
download | llvm-0be167bab219cb178f7a6e91186c700ad48aa047.tar.gz llvm-0be167bab219cb178f7a6e91186c700ad48aa047.tar.bz2 llvm-0be167bab219cb178f7a6e91186c700ad48aa047.tar.xz |
OCaml bindings: fix attributes to use all 32 bits
OCaml's int is limited to 31 bits on 32-bit architectures, so use Int32
explicitly.
Also add an unpack_attr, and {function,param,instr}_attr functions to read
the attributes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141996 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'bindings/ocaml/llvm/llvm.mli')
-rw-r--r-- | bindings/ocaml/llvm/llvm.mli | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/bindings/ocaml/llvm/llvm.mli b/bindings/ocaml/llvm/llvm.mli index f5538f4897..a90a72b771 100644 --- a/bindings/ocaml/llvm/llvm.mli +++ b/bindings/ocaml/llvm/llvm.mli @@ -139,6 +139,9 @@ module Attribute : sig | Naked | Inlinehint | Stackalignment of int + | ReturnsTwice + | UWTable + | NonLazyBind end (** The predicate for an integer comparison ([icmp]) instruction. @@ -1368,6 +1371,10 @@ val set_gc : string option -> llvalue -> unit [f]. *) val add_function_attr : llvalue -> Attribute.t -> unit +(** [function_attr f] returns the function attribute for the function [f]. + * See the method [llvm::Function::getAttributes] *) +val function_attr : llvalue -> Attribute.t list + (** [remove_function_attr f a] removes attribute [a] from the return type of function [f]. *) val remove_function_attr : llvalue -> Attribute.t -> unit @@ -1382,6 +1389,11 @@ val params : llvalue -> llvalue array See the method [llvm::Function::getArgumentList]. *) val param : llvalue -> int -> llvalue +(** [param_attr p] returns the attributes of parameter [p]. + * See the methods [llvm::Function::getAttributes] and + * [llvm::Attributes::getParamAttributes] *) +val param_attr : llvalue -> Attribute.t list + (** [param_parent p] returns the parent function that owns the parameter. See the method [llvm::Argument::getParent]. *) val param_parent : llvalue -> llvalue |