diff options
| author | The Miri Cronjob Bot <miri@cron.bot> | 2024-04-26 05:08:12 +0000 |
|---|---|---|
| committer | The Miri Cronjob Bot <miri@cron.bot> | 2024-04-26 05:08:12 +0000 |
| commit | 4be9c689f6601c4359f018ddec52a7dec9a8ac66 (patch) | |
| tree | f56969ba1a30728239bb8db65a17fea1ad06bbdf /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp | |
| parent | 4dcc2fac06a2d9194a05853482dcdf6d453f251d (diff) | |
| parent | 6acb9e75ebc936df737381a9d0b7a7bccd6f0b2f (diff) | |
| download | rust-4be9c689f6601c4359f018ddec52a7dec9a8ac66.tar.gz rust-4be9c689f6601c4359f018ddec52a7dec9a8ac66.zip | |
Merge from rustc
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
| -rw-r--r-- | compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp | 10 |
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"); } |
