about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-04-26 05:27:00 +0000
committerbors <bors@rust-lang.org>2024-04-26 05:27:00 +0000
commit82921058e759717f56c3e9b23c114577dbdffdfb (patch)
treef56969ba1a30728239bb8db65a17fea1ad06bbdf /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
parent9f7194b5eb05022822be25f2011c1cc73ba972b5 (diff)
parent4be9c689f6601c4359f018ddec52a7dec9a8ac66 (diff)
downloadrust-82921058e759717f56c3e9b23c114577dbdffdfb.tar.gz
rust-82921058e759717f56c3e9b23c114577dbdffdfb.zip
Auto merge of #3515 - rust-lang:rustup-2024-04-26, r=oli-obk
Automatic Rustup
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
-rw-r--r--compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
index 565bdc3af03..20167a4b45e 100644
--- a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
+++ b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
@@ -312,6 +312,16 @@ static Attribute::AttrKind fromRust(LLVMRustAttribute Kind) {
     return Attribute::SafeStack;
   case FnRetThunkExtern:
     return Attribute::FnRetThunkExtern;
+#if LLVM_VERSION_GE(18, 0)
+  case Writable:
+    return Attribute::Writable;
+  case DeadOnUnwind:
+    return Attribute::DeadOnUnwind;
+#else
+  case Writable:
+  case DeadOnUnwind:
+    report_fatal_error("Not supported on this LLVM version");
+#endif
   }
   report_fatal_error("bad AttributeKind");
 }