diff options
author | rdivacky <rdivacky@FreeBSD.org> | 2009-10-14 17:57:32 +0000 |
---|---|---|
committer | rdivacky <rdivacky@FreeBSD.org> | 2009-10-14 17:57:32 +0000 |
commit | cd749a9c07f1de2fb8affde90537efa4bc3e7c54 (patch) | |
tree | b21f6de4e08b89bb7931806bab798fc2a5e3a686 /bindings/ocaml/bitreader/bitreader_ocaml.c | |
parent | 72621d11de5b873f1695f391eb95f0b336c3d2d4 (diff) | |
download | FreeBSD-src-cd749a9c07f1de2fb8affde90537efa4bc3e7c54.zip FreeBSD-src-cd749a9c07f1de2fb8affde90537efa4bc3e7c54.tar.gz |
Update llvm to r84119.
Diffstat (limited to 'bindings/ocaml/bitreader/bitreader_ocaml.c')
-rw-r--r-- | bindings/ocaml/bitreader/bitreader_ocaml.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/bindings/ocaml/bitreader/bitreader_ocaml.c b/bindings/ocaml/bitreader/bitreader_ocaml.c index 0fd484f..5fd9f85 100644 --- a/bindings/ocaml/bitreader/bitreader_ocaml.c +++ b/bindings/ocaml/bitreader/bitreader_ocaml.c @@ -45,27 +45,29 @@ static void llvm_raise(value Prototype, char *Message) { /*===-- Modules -----------------------------------------------------------===*/ -/* Llvm.llmemorybuffer -> Llvm.module */ -CAMLprim value llvm_get_module_provider(LLVMMemoryBufferRef MemBuf) { +/* Llvm.llcontext -> Llvm.llmemorybuffer -> Llvm.llmodule */ +CAMLprim value llvm_get_module_provider(LLVMContextRef C, + LLVMMemoryBufferRef MemBuf) { CAMLparam0(); CAMLlocal2(Variant, MessageVal); char *Message; LLVMModuleProviderRef MP; - if (LLVMGetBitcodeModuleProvider(MemBuf, &MP, &Message)) + if (LLVMGetBitcodeModuleProviderInContext(C, MemBuf, &MP, &Message)) llvm_raise(llvm_bitreader_error_exn, Message); CAMLreturn((value) MemBuf); } -/* Llvm.llmemorybuffer -> Llvm.llmodule */ -CAMLprim value llvm_parse_bitcode(LLVMMemoryBufferRef MemBuf) { +/* Llvm.llcontext -> Llvm.llmemorybuffer -> Llvm.llmodule */ +CAMLprim value llvm_parse_bitcode(LLVMContextRef C, + LLVMMemoryBufferRef MemBuf) { CAMLparam0(); CAMLlocal2(Variant, MessageVal); LLVMModuleRef M; char *Message; - if (LLVMParseBitcode(MemBuf, &M, &Message)) + if (LLVMParseBitcodeInContext(C, MemBuf, &M, &Message)) llvm_raise(llvm_bitreader_error_exn, Message); CAMLreturn((value) M); |