aboutsummaryrefslogtreecommitdiff
path: root/src/zig_llvm.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2021-09-20 20:37:04 -0400
committerGitHub <noreply@github.com>2021-09-20 20:37:04 -0400
commit1ad905c71e0896295d4781853cd577bbe1b4111a (patch)
tree7d81da6b6fd3ee721b041eb33b3918707f2698df /src/zig_llvm.cpp
parent2a728f6e5f0c5d12e110313342e714f9f23c4044 (diff)
parentf8b914fcf328b30f98d31bb6461c953e4b7a33a7 (diff)
downloadzig-1ad905c71e0896295d4781853cd577bbe1b4111a.tar.gz
zig-1ad905c71e0896295d4781853cd577bbe1b4111a.zip
Merge pull request #9649 from Snektron/address-space
Address Spaces
Diffstat (limited to 'src/zig_llvm.cpp')
-rw-r--r--src/zig_llvm.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/zig_llvm.cpp b/src/zig_llvm.cpp
index e1ab74f423..6e136161a6 100644
--- a/src/zig_llvm.cpp
+++ b/src/zig_llvm.cpp
@@ -416,6 +416,11 @@ ZIG_EXTERN_C LLVMTypeRef ZigLLVMTokenTypeInContext(LLVMContextRef context_ref) {
return wrap(Type::getTokenTy(*unwrap(context_ref)));
}
+LLVMValueRef ZigLLVMAddFunctionInAddressSpace(LLVMModuleRef M, const char *Name, LLVMTypeRef FunctionTy, unsigned AddressSpace) {
+ Function* func = Function::Create(unwrap<FunctionType>(FunctionTy), GlobalValue::ExternalLinkage, AddressSpace, Name, unwrap(M));
+ return wrap(func);
+}
+
LLVMValueRef ZigLLVMBuildCall(LLVMBuilderRef B, LLVMValueRef Fn, LLVMValueRef *Args,
unsigned NumArgs, ZigLLVM_CallingConv CC, ZigLLVM_CallAttr attr, const char *Name)
{