diff options
| author | Tshepang Mbambo <hopsi@tuta.io> | 2025-08-04 15:20:57 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-08-04 15:20:57 +0200 |
| commit | a13caaae3e87d9084a16f023e91880dd2ef0bc09 (patch) | |
| tree | ad7f71f36fed97f65204d8a1f8c594c8ac1d2df8 /compiler/rustc_codegen_llvm/src/llvm/ffi.rs | |
| parent | 788845811e076df8edceccd49e174d2b3ec4e71d (diff) | |
| parent | 682a6e17e4dcc02944b00834f11e7cdd7067ebd1 (diff) | |
| download | rust-a13caaae3e87d9084a16f023e91880dd2ef0bc09.tar.gz rust-a13caaae3e87d9084a16f023e91880dd2ef0bc09.zip | |
Merge pull request #2533 from rust-lang/rustc-pull
Rustc pull update
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/llvm/ffi.rs')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/llvm/ffi.rs | 11 |
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 0d0cb5f139e..2443194ff48 100644 --- a/compiler/rustc_codegen_llvm/src/llvm/ffi.rs +++ b/compiler/rustc_codegen_llvm/src/llvm/ffi.rs @@ -97,6 +97,16 @@ pub(crate) enum ModuleFlagMergeBehavior { // Consts for the LLVM CallConv type, pre-cast to usize. +#[derive(Copy, Clone, PartialEq, Debug)] +#[repr(C)] +#[allow(dead_code)] +pub(crate) enum TailCallKind { + None = 0, + Tail = 1, + MustTail = 2, + NoTail = 3, +} + /// LLVM CallingConv::ID. Should we wrap this? /// /// See <https://github.com/llvm/llvm-project/blob/main/llvm/include/llvm/IR/CallingConv.h> @@ -1186,6 +1196,7 @@ unsafe extern "C" { pub(crate) safe fn LLVMIsGlobalConstant(GlobalVar: &Value) -> Bool; pub(crate) safe fn LLVMSetGlobalConstant(GlobalVar: &Value, IsConstant: Bool); pub(crate) safe fn LLVMSetTailCall(CallInst: &Value, IsTailCall: Bool); + pub(crate) safe fn LLVMRustSetTailCallKind(CallInst: &Value, Kind: TailCallKind); // Operations on attributes pub(crate) fn LLVMCreateStringAttribute( |
