From 150c95eab549e1d764eab7ed05b17fe09663fc6e Mon Sep 17 00:00:00 2001 From: Peter Zotov Date: Tue, 5 Nov 2013 11:56:13 +0000 Subject: [OCaml] (PR11717) Make declare_qualified_global respect address argument Original patch by Jonathan Ragan-Kelley git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194064 91177308-0d34-0410-b5e6-96231b3b80d8 --- bindings/ocaml/llvm/llvm_ocaml.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'bindings') diff --git a/bindings/ocaml/llvm/llvm_ocaml.c b/bindings/ocaml/llvm/llvm_ocaml.c index 927432e..46c170b 100644 --- a/bindings/ocaml/llvm/llvm_ocaml.c +++ b/bindings/ocaml/llvm/llvm_ocaml.c @@ -930,7 +930,8 @@ CAMLprim LLVMValueRef llvm_declare_qualified_global(LLVMTypeRef Ty, value Name, LLVMPointerType(Ty, Int_val(AddressSpace))); return GlobalVar; } - return LLVMAddGlobal(M, Ty, String_val(Name)); + return LLVMAddGlobalInAddressSpace(M, Ty, String_val(Name), + Int_val(AddressSpace)); } /* string -> llmodule -> llvalue option */ -- cgit v1.1