[LLVMbugs] [Bug 11717] New: OCaml declare_qualified_global does not respect address space argument

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Jan 5 20:48:02 PST 2012


             Bug #: 11717
           Summary: OCaml declare_qualified_global does not respect
                    address space argument
           Product: libraries
           Version: trunk
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Archive library
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: jrk at csail.mit.edu
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Without the below patch, it currently ignores the address space argument.
define_qualified_global, however, *does* work, using LLVMAddGlobal as I have
mirrored in the patch.

diff --git a/bindings/ocaml/llvm/llvm_ocaml.c
index b64bba1..412e0bf 100644
--- a/bindings/ocaml/llvm/llvm_ocaml.c
+++ b/bindings/ocaml/llvm/llvm_ocaml.c
@@ -877,7 +877,7 @@ CAMLprim LLVMValueRef
                               LLVMPointerType(Ty, Int_val(AddressSpace)));
     return GlobalVar;
-  return LLVMAddGlobal(M, Ty, String_val(Name));
+  return LLVMAddGlobalInAddressSpace(M, Ty, String_val(Name),

 /* string -> llmodule -> llvalue option */

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