Fix bug 5992: O'Caml's llvm_create_module was treating the context as a string.

Thanks Andy Ray for catching this!

llvm-svn: 93588
This commit is contained in:
Erick Tryzelaar 2010-01-15 23:49:16 +00:00
parent 5f4c482b72
commit 562dfbef93

View File

@ -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 */