diff options
| author | Tshepang Mbambo <hopsi@tuta.io> | 2025-08-18 08:31:49 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-08-18 08:31:49 +0200 |
| commit | 2787e9ebf933b2dfb3f3866913731560f9a359d8 (patch) | |
| tree | f79760d147848a6b9f97563a5a80dab46c7dd2d1 /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp | |
| parent | f2294bbccf7b2788e450a8f7cea13b3321709482 (diff) | |
| parent | 5818cbdd441bba57d509d549807af42f004ed21b (diff) | |
| download | rust-2787e9ebf933b2dfb3f3866913731560f9a359d8.tar.gz rust-2787e9ebf933b2dfb3f3866913731560f9a359d8.zip | |
Merge pull request #2547 from rust-lang/rustc-pull
Rustc pull update
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
| -rw-r--r-- | compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp index 588d867bbbf..cd4f80f808c 100644 --- a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp +++ b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp @@ -277,6 +277,7 @@ enum class LLVMRustAttributeKind { FnRetThunkExtern = 41, Writable = 42, DeadOnUnwind = 43, + DeadOnReturn = 44, }; static Attribute::AttrKind fromRust(LLVMRustAttributeKind Kind) { @@ -369,6 +370,12 @@ static Attribute::AttrKind fromRust(LLVMRustAttributeKind Kind) { return Attribute::Writable; case LLVMRustAttributeKind::DeadOnUnwind: return Attribute::DeadOnUnwind; + case LLVMRustAttributeKind::DeadOnReturn: +#if LLVM_VERSION_GE(21, 0) + return Attribute::DeadOnReturn; +#else + report_fatal_error("DeadOnReturn attribute requires LLVM 21 or later"); +#endif } report_fatal_error("bad LLVMRustAttributeKind"); } |
