diff options
| author | Jacob Young <jacobly0@users.noreply.github.com> | 2023-07-21 00:51:50 -0400 |
|---|---|---|
| committer | Jacob Young <jacobly0@users.noreply.github.com> | 2023-07-23 23:48:18 -0400 |
| commit | aa44f8f0fd1a4af9df65a9b9bfc5fe6fa0d31b9f (patch) | |
| tree | 0f57991e2e463e963e117e0046f87efcf2aa6be5 /src/zig_llvm.cpp | |
| parent | 23a806102a5a3d5b28b2e5ab5ec30e191daea6f4 (diff) | |
| download | zig-aa44f8f0fd1a4af9df65a9b9bfc5fe6fa0d31b9f.tar.gz zig-aa44f8f0fd1a4af9df65a9b9bfc5fe6fa0d31b9f.zip | |
llvm: convert attributes and non-intrinsic calls
Diffstat (limited to 'src/zig_llvm.cpp')
| -rw-r--r-- | src/zig_llvm.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/zig_llvm.cpp b/src/zig_llvm.cpp index 26ea04aca6..d22bfc1b47 100644 --- a/src/zig_llvm.cpp +++ b/src/zig_llvm.cpp @@ -453,6 +453,10 @@ LLVMValueRef ZigLLVMBuildCall(LLVMBuilderRef B, LLVMTypeRef Ty, LLVMValueRef Fn, return wrap(call_inst); } +ZIG_EXTERN_C void ZigLLVMSetTailCallKind(LLVMValueRef Call, CallInst::TailCallKind TailCallKind) { + unwrap<CallInst>(Call)->setTailCallKind(TailCallKind); +} + void ZigLLVMAddAttributeAtIndex(LLVMValueRef Val, unsigned Idx, LLVMAttributeRef A) { if (isa<Function>(unwrap(Val))) { unwrap<Function>(Val)->addAttributeAtIndex(Idx, unwrap(A)); @@ -461,7 +465,6 @@ void ZigLLVMAddAttributeAtIndex(LLVMValueRef Val, unsigned Idx, LLVMAttributeRef } } - LLVMValueRef ZigLLVMBuildMemCpy(LLVMBuilderRef B, LLVMValueRef Dst, unsigned DstAlign, LLVMValueRef Src, unsigned SrcAlign, LLVMValueRef Size, bool isVolatile) { @@ -1116,11 +1119,6 @@ void ZigLLVMAddFunctionAttr(LLVMValueRef fn_ref, const char *attr_name, const ch func->addFnAttr(attr_name, attr_value); } -void ZigLLVMAddFunctionAttrCold(LLVMValueRef fn_ref) { - Function *func = unwrap<Function>(fn_ref); - func->addFnAttr(Attribute::Cold); -} - void ZigLLVMParseCommandLineOptions(size_t argc, const char *const *argv) { cl::ParseCommandLineOptions(argc, argv); } |
