diff options
| author | fee1-dead <ent3rm4n@gmail.com> | 2023-07-06 09:20:31 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-07-06 09:20:31 +0800 |
| commit | e461502e06b171c05d4730b4d1a2846a1e5847fa (patch) | |
| tree | 40e3cce514efa8d9ec9a9b9dc076fca91886527a /compiler/rustc_codegen_llvm/src | |
| parent | 6e9bdacaf9ec183df9c3027c33775fee868f8435 (diff) | |
| parent | bf5eaa45506bbaa5fe9322c4e114d89fd87ad5f4 (diff) | |
| download | rust-e461502e06b171c05d4730b4d1a2846a1e5847fa.tar.gz rust-e461502e06b171c05d4730b4d1a2846a1e5847fa.zip | |
Rollup merge of #112791 - WaffleLapkin:wag_the_llvm, r=cuviper
llvm ffi: Expose `CallInst->setTailCallKind` This is needed for the explicit tail calls experiment.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
| -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 8ee40b98e2d..3ad546b61e9 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)] @@ -1196,6 +1206,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; |
