From fb47255591d938ea0e7ad2ad5f00f800949bf959 Mon Sep 17 00:00:00 2001 From: Erick Tryzelaar Date: Fri, 15 Jan 2010 23:49:16 +0000 Subject: [PATCH] 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 --- llvm/bindings/ocaml/llvm/llvm_ocaml.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/llvm/bindings/ocaml/llvm/llvm_ocaml.c b/llvm/bindings/ocaml/llvm/llvm_ocaml.c index 8868d07ffc7a..6cc475d6d448 100644 --- a/llvm/bindings/ocaml/llvm/llvm_ocaml.c +++ b/llvm/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 */