diff options
author | Erick Tryzelaar <idadesub@users.sourceforge.net> | 2010-03-02 23:59:00 +0000 |
---|---|---|
committer | Erick Tryzelaar <idadesub@users.sourceforge.net> | 2010-03-02 23:59:00 +0000 |
commit | 16609f3c5c26ba34603ae0d7ebab86fb11a72722 (patch) | |
tree | 7072d503c07f4c3370ed067787f84d7cc93c0ff7 /bindings/ocaml/bitreader | |
parent | df7df075b723e926e51555bf5aff6e231279a479 (diff) | |
download | external_llvm-16609f3c5c26ba34603ae0d7ebab86fb11a72722.zip external_llvm-16609f3c5c26ba34603ae0d7ebab86fb11a72722.tar.gz external_llvm-16609f3c5c26ba34603ae0d7ebab86fb11a72722.tar.bz2 |
Remove module providers from ocaml.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97609 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'bindings/ocaml/bitreader')
-rw-r--r-- | bindings/ocaml/bitreader/bitreader_ocaml.c | 9 | ||||
-rw-r--r-- | bindings/ocaml/bitreader/llvm_bitreader.ml | 5 | ||||
-rw-r--r-- | bindings/ocaml/bitreader/llvm_bitreader.mli | 14 |
3 files changed, 12 insertions, 16 deletions
diff --git a/bindings/ocaml/bitreader/bitreader_ocaml.c b/bindings/ocaml/bitreader/bitreader_ocaml.c index 318c703..ef72ce2 100644 --- a/bindings/ocaml/bitreader/bitreader_ocaml.c +++ b/bindings/ocaml/bitreader/bitreader_ocaml.c @@ -46,17 +46,16 @@ static void llvm_raise(value Prototype, char *Message) { /*===-- Modules -----------------------------------------------------------===*/ /* Llvm.llcontext -> Llvm.llmemorybuffer -> Llvm.llmodule */ -CAMLprim value llvm_get_module_provider(LLVMContextRef C, - LLVMMemoryBufferRef MemBuf) { +CAMLprim value llvm_get_module(LLVMContextRef C, LLVMMemoryBufferRef MemBuf) { CAMLparam0(); CAMLlocal2(Variant, MessageVal); char *Message; - LLVMModuleProviderRef MP; - if (LLVMGetBitcodeModuleProviderInContext(C, MemBuf, &MP, &Message)) + LLVMModuleRef M; + if (LLVMGetBitcodeModuleInContext(C, MemBuf, &M, &Message)) llvm_raise(llvm_bitreader_error_exn, Message); - CAMLreturn((value) MP); + CAMLreturn((value) M); } /* Llvm.llcontext -> Llvm.llmemorybuffer -> Llvm.llmodule */ diff --git a/bindings/ocaml/bitreader/llvm_bitreader.ml b/bindings/ocaml/bitreader/llvm_bitreader.ml index 88587cb..8b9d01d 100644 --- a/bindings/ocaml/bitreader/llvm_bitreader.ml +++ b/bindings/ocaml/bitreader/llvm_bitreader.ml @@ -13,9 +13,8 @@ exception Error of string external register_exns : exn -> unit = "llvm_register_bitreader_exns" let _ = register_exns (Error "") -external get_module_provider : Llvm.llcontext -> Llvm.llmemorybuffer -> - Llvm.llmoduleprovider - = "llvm_get_module_provider" +external get_module : Llvm.llcontext -> Llvm.llmemorybuffer -> Llvm.llmodule + = "llvm_get_module" external parse_bitcode : Llvm.llcontext -> Llvm.llmemorybuffer -> Llvm.llmodule = "llvm_parse_bitcode" diff --git a/bindings/ocaml/bitreader/llvm_bitreader.mli b/bindings/ocaml/bitreader/llvm_bitreader.mli index 5648b35..5e22409 100644 --- a/bindings/ocaml/bitreader/llvm_bitreader.mli +++ b/bindings/ocaml/bitreader/llvm_bitreader.mli @@ -14,14 +14,12 @@ exception Error of string -(** [get_module_provider context mb] reads the bitcode for a new - module provider [m] from the memory buffer [mb] in the context [context]. - Returns [m] if successful, or raises [Error msg] otherwise, where [msg] is a - description of the error encountered. See the function - [llvm::getBitcodeModuleProvider]. *) -external get_module_provider : Llvm.llcontext -> Llvm.llmemorybuffer -> - Llvm.llmoduleprovider - = "llvm_get_module_provider" +(** [get_module context mb] reads the bitcode for a new module [m] from the + memory buffer [mb] in the context [context]. Returns [m] if successful, or + raises [Error msg] otherwise, where [msg] is a description of the error + encountered. See the function [llvm::getBitcodeModule]. *) +external get_module : Llvm.llcontext -> Llvm.llmemorybuffer -> Llvm.llmodule + = "llvm_get_module" (** [parse_bitcode context mb] parses the bitcode for a new module [m] from the memory buffer [mb] in the context [context]. Returns [m] if successful, or |