aboutsummaryrefslogtreecommitdiff
path: root/src/zig_llvm.cpp
diff options
context:
space:
mode:
authorRobin Voetter <robin@voetter.nl>2021-08-29 06:08:19 +0200
committerRobin Voetter <robin@voetter.nl>2021-09-20 02:29:04 +0200
commitea393b2bca7587955df81d149caecc5522944d15 (patch)
tree1391b7c5e6a462e86c8730e9a74c046b2d95a827 /src/zig_llvm.cpp
parente09465fc49d86cc4aa9338106862d3e059ae3303 (diff)
downloadzig-ea393b2bca7587955df81d149caecc5522944d15.tar.gz
zig-ea393b2bca7587955df81d149caecc5522944d15.zip
Address Spaces: Implement in LLVM codegen
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)
{