about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorMaybe Waffle <waffle.lapkin@gmail.com>2023-05-09 10:02:59 +0000
committerMaybe Waffle <waffle.lapkin@gmail.com>2023-06-30 16:31:45 +0000
commitbf5eaa45506bbaa5fe9322c4e114d89fd87ad5f4 (patch)
treeceabd9c22d90ddee9390c5a1126828fecbe49737 /compiler/rustc_codegen_llvm/src
parent8d1fa473dddd12efb2430302e5f5dfcc3eb73f8b (diff)
downloadrust-bf5eaa45506bbaa5fe9322c4e114d89fd87ad5f4.tar.gz
rust-bf5eaa45506bbaa5fe9322c4e114d89fd87ad5f4.zip
llvm ffi: Expose `CallInst->setTailCallKind`
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
-rw-r--r--compiler/rustc_codegen_llvm/src/llvm/ffi.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/compiler/rustc_codegen_llvm/src/llvm/ffi.rs b/compiler/rustc_codegen_llvm/src/llvm/ffi.rs
index 6ef3418cc5f..1883a8aa0a3 100644
--- a/compiler/rustc_codegen_llvm/src/llvm/ffi.rs
+++ b/compiler/rustc_codegen_llvm/src/llvm/ffi.rs
@@ -585,6 +585,16 @@ pub enum ThreadLocalMode {
     LocalExec,
 }
 
+/// LLVMRustTailCallKind
+#[derive(Copy, Clone)]
+#[repr(C)]
+pub enum TailCallKind {
+    None,
+    Tail,
+    MustTail,
+    NoTail,
+}
+
 /// LLVMRustChecksumKind
 #[derive(Copy, Clone)]
 #[repr(C)]
@@ -1195,6 +1205,7 @@ extern "C" {
         NameLen: size_t,
     ) -> Option<&Value>;
     pub fn LLVMSetTailCall(CallInst: &Value, IsTailCall: Bool);
+    pub fn LLVMRustSetTailCallKind(CallInst: &Value, TKC: TailCallKind);
 
     // Operations on attributes
     pub fn LLVMRustCreateAttrNoValue(C: &Context, attr: AttributeKind) -> &Attribute;