diff options
| author | Ralf Jung <post@ralfj.de> | 2022-12-16 12:19:43 +0100 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2022-12-16 12:19:43 +0100 |
| commit | 3d67703e75912a0f58b43feae8ee8b5b20504dfe (patch) | |
| tree | c05fb48510935410d6bea3011c5442c26bbec2ce /compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp | |
| parent | 33e5b953de13307a4b4206d85b74ea55e81d38a1 (diff) | |
| parent | 4251289f27949cec69d8aa39d3891a4977fbc856 (diff) | |
| download | rust-3d67703e75912a0f58b43feae8ee8b5b20504dfe.tar.gz rust-3d67703e75912a0f58b43feae8ee8b5b20504dfe.zip | |
Merge from rustc
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp')
| -rw-r--r-- | compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp index 1a3d458c300..2865ea89273 100644 --- a/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp +++ b/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp @@ -223,7 +223,11 @@ fromRust(LLVMRustCodeModel Model) { case LLVMRustCodeModel::Large: return CodeModel::Large; case LLVMRustCodeModel::None: +#if LLVM_VERSION_LT(16, 0) return None; +#else + return std::nullopt; +#endif default: report_fatal_error("Bad CodeModel."); } |
