summaryrefslogtreecommitdiff
path: root/bindings
diff options
context:
space:
mode:
authorErick Tryzelaar <idadesub@users.sourceforge.net>2010-02-28 09:46:27 +0000
committerErick Tryzelaar <idadesub@users.sourceforge.net>2010-02-28 09:46:27 +0000
commit5b0a7741ad262315d6365250a2da2edb8ba37e69 (patch)
treef7cd5ddb7655c00ce7bd07bb4c3b6fb2ff043d0b /bindings
parentd80ce75687c22e63d746d732b4e28fd5a1207a9d (diff)
downloadllvm-5b0a7741ad262315d6365250a2da2edb8ba37e69.tar.gz
llvm-5b0a7741ad262315d6365250a2da2edb8ba37e69.tar.bz2
llvm-5b0a7741ad262315d6365250a2da2edb8ba37e69.tar.xz
Add support for getting a null pointer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97380 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'bindings')
-rw-r--r--bindings/ocaml/llvm/llvm.ml1
-rw-r--r--bindings/ocaml/llvm/llvm.mli4
2 files changed, 5 insertions, 0 deletions
diff --git a/bindings/ocaml/llvm/llvm.ml b/bindings/ocaml/llvm/llvm.ml
index c317a80458..7c72a61abc 100644
--- a/bindings/ocaml/llvm/llvm.ml
+++ b/bindings/ocaml/llvm/llvm.ml
@@ -246,6 +246,7 @@ external replace_all_uses_with : llvalue -> llvalue -> unit
external is_constant : llvalue -> bool = "llvm_is_constant"
external const_null : lltype -> llvalue = "LLVMConstNull"
external const_all_ones : (*int|vec*)lltype -> llvalue = "LLVMConstAllOnes"
+external const_pointer_null : lltype -> llvalue = "LLVMConstPointerNull"
external undef : lltype -> llvalue = "LLVMGetUndef"
external is_null : llvalue -> bool = "llvm_is_null"
external is_undef : llvalue -> bool = "llvm_is_undef"
diff --git a/bindings/ocaml/llvm/llvm.mli b/bindings/ocaml/llvm/llvm.mli
index 7025f85b54..9f91980943 100644
--- a/bindings/ocaml/llvm/llvm.mli
+++ b/bindings/ocaml/llvm/llvm.mli
@@ -527,6 +527,10 @@ external const_null : lltype -> llvalue = "LLVMConstNull"
[ty]. See the method [llvm::Constant::getAllOnesValue]. *)
external const_all_ones : (*int|vec*)lltype -> llvalue = "LLVMConstAllOnes"
+(** [const_pointer_null ty] returns the constant null (zero) pointer of the type
+ [ty]. See the method [llvm::ConstantPointerNull::get]. *)
+external const_pointer_null : lltype -> llvalue = "LLVMConstPointerNull"
+
(** [undef ty] returns the undefined value of the type [ty].
See the method [llvm::UndefValue::get]. *)
external undef : lltype -> llvalue = "LLVMGetUndef"