[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
This commit is contained in:
Peter Zotov
2013-11-05 11:56:13 +00:00
parent 8f198b0d60
commit 150c95eab5
2 changed files with 8 additions and 4 deletions

View File

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