From: Erick Tryzelaar Date: Fri, 15 Jan 2010 23:49:16 +0000 (+0000) Subject: Fix bug 5992: O'Caml's llvm_create_module was treating the context as a string. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=263d989a719c1864862fc91f59193a6c2b55ca48;p=oota-llvm.git Fix bug 5992: O'Caml's llvm_create_module was treating the context as a string. Thanks Andy Ray for catching this! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93588 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/bindings/ocaml/llvm/llvm_ocaml.c b/bindings/ocaml/llvm/llvm_ocaml.c index 8868d07ffc7..6cc475d6d44 100644 --- a/bindings/ocaml/llvm/llvm_ocaml.c +++ b/bindings/ocaml/llvm/llvm_ocaml.c @@ -112,9 +112,9 @@ CAMLprim LLVMContextRef llvm_global_context(value Unit) { /*===-- Modules -----------------------------------------------------------===*/ -/* string -> llmodule */ -CAMLprim LLVMModuleRef llvm_create_module(value ModuleID) { - return LLVMModuleCreateWithName(String_val(ModuleID)); +/* llcontext -> string -> llmodule */ +CAMLprim LLVMModuleRef llvm_create_module(LLVMContextRef C, value ModuleID) { + return LLVMModuleCreateWithNameInContext(String_val(ModuleID), C); } /* llmodule -> unit */