about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
diff options
context:
space:
mode:
authorOli Scherer <github35764891676564198441@oli-obk.de>2025-08-15 05:37:38 +0000
committerGitHub <noreply@github.com>2025-08-15 05:37:38 +0000
commitfb8ac986b178ed977c3334ad27198b787e1e6140 (patch)
tree0357a02c333b17b444b55ee9b311aa62eee0b0b7 /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
parentfa41e9b47348171862773b70eaca70a0ff240963 (diff)
parent1c55a277732442297fb8fe1c92ea0b3c59c5825b (diff)
downloadrust-fb8ac986b178ed977c3334ad27198b787e1e6140.tar.gz
rust-fb8ac986b178ed977c3334ad27198b787e1e6140.zip
Merge pull request #4527 from rust-lang/rustup-2025-08-15
Automatic Rustup
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
-rw-r--r--compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp7
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");
 }