aboutsummaryrefslogtreecommitdiff
path: root/src/zig_llvm.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2023-07-24 02:16:00 -0700
committerGitHub <noreply@github.com>2023-07-24 02:16:00 -0700
commitd21d1d4ba25701410b9ae99921326f8bfc8a44dd (patch)
treec56738ededf5966ce448e57be393996f76976426 /src/zig_llvm.cpp
parent98c7aec4e4ae7deac5e802a8c592c2d91b6b77af (diff)
parent3fc2e36de2d125b2de255b03abc24bea30899caf (diff)
downloadzig-d21d1d4ba25701410b9ae99921326f8bfc8a44dd.tar.gz
zig-d21d1d4ba25701410b9ae99921326f8bfc8a44dd.zip
Merge pull request #16487 from jacobly0/llvm-builder
llvm: incremental Builder improvements
Diffstat (limited to 'src/zig_llvm.cpp')
-rw-r--r--src/zig_llvm.cpp10
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);
}