diff options
| author | The Miri Cronjob Bot <miri@cron.bot> | 2025-08-01 05:14:11 +0000 |
|---|---|---|
| committer | The Miri Cronjob Bot <miri@cron.bot> | 2025-08-01 05:14:11 +0000 |
| commit | 9f88ca3398fd772089494c61d1eb918c552c5387 (patch) | |
| tree | a99d683acfe913fcd8c70e2810f02073300cb758 /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp | |
| parent | 67cce09bfb87c896ec83117d0d61f847cdb8de60 (diff) | |
| parent | ad61b3113c7ce43c60134bf5441397b82898a78c (diff) | |
| download | rust-9f88ca3398fd772089494c61d1eb918c552c5387.tar.gz rust-9f88ca3398fd772089494c61d1eb918c552c5387.zip | |
Merge ref 'adcb3d3b4cd3' from rust-lang/rust
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: adcb3d3b4cd3b7c4cde642f3ed537037f293738e Filtered ref: 5825740f16c56a1dac078765954330b987825b73 This merge was created using https://github.com/rust-lang/josh-sync.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
| -rw-r--r-- | compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp index c9814beedd6..588d867bbbf 100644 --- a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp +++ b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp @@ -1986,3 +1986,29 @@ extern "C" void LLVMRustSetNoSanitizeHWAddress(LLVMValueRef Global) { MD.NoHWAddress = true; GV.setSanitizerMetadata(MD); } + +enum class LLVMRustTailCallKind { + None = 0, + Tail = 1, + MustTail = 2, + NoTail = 3 +}; + +extern "C" void LLVMRustSetTailCallKind(LLVMValueRef Call, + LLVMRustTailCallKind Kind) { + CallInst *CI = unwrap<CallInst>(Call); + switch (Kind) { + case LLVMRustTailCallKind::None: + CI->setTailCallKind(CallInst::TCK_None); + break; + case LLVMRustTailCallKind::Tail: + CI->setTailCallKind(CallInst::TCK_Tail); + break; + case LLVMRustTailCallKind::MustTail: + CI->setTailCallKind(CallInst::TCK_MustTail); + break; + case LLVMRustTailCallKind::NoTail: + CI->setTailCallKind(CallInst::TCK_NoTail); + break; + } +} |
