aboutsummaryrefslogtreecommitdiffstats
path: root/bindings
diff options
context:
space:
mode:
authorPeter Zotov <whitequark@whitequark.org>2013-11-05 11:56:13 +0000
committerPeter Zotov <whitequark@whitequark.org>2013-11-05 11:56:13 +0000
commit150c95eab549e1d764eab7ed05b17fe09663fc6e (patch)
tree305c4ca079c2cbac046d349f6e9e3e56d4bba202 /bindings
parent8f198b0d60ffed27260f0759fa1d0a3546d360c9 (diff)
downloadexternal_llvm-150c95eab549e1d764eab7ed05b17fe09663fc6e.zip
external_llvm-150c95eab549e1d764eab7ed05b17fe09663fc6e.tar.gz
external_llvm-150c95eab549e1d764eab7ed05b17fe09663fc6e.tar.bz2
[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
Diffstat (limited to 'bindings')
-rw-r--r--bindings/ocaml/llvm/llvm_ocaml.c3
1 files changed, 2 insertions, 1 deletions
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 */