[LLVMbugs] [Bug 5992] New: OCAML binding; llvm_create_module uses wrong parameters

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Mon Jan 11 04:11:09 PST 2010


           Summary: OCAML binding; llvm_create_module uses wrong parameters
           Product: new-bugs
           Version: trunk
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: evilkidder at googlemail.com
                CC: llvmbugs at cs.uiuc.edu

bindings/ocaml/llvm/llvm.ml, line 137;

create_module declared taking 2 parameters; llcontext + string

bindings/ocaml/llvm/llvm_ocaml.c, line 121;

llvm_create_module takes 1 parameter; string.  Note: within the binding the
llcontext is effectively passed as the string name which leads to a corrupt
module name.  The following fix seems to work.

CAMLprim LLVMModuleRef llvm_create_module(LLVMContextRef c, value ModuleID) {
  return LLVMModuleCreateWithNameInContext(String_val(ModuleID), c);

Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

More information about the llvm-bugs mailing list