Drop support for -Znew-llvm-pass-manager=no with LLVM 15

This commit is contained in:
Nikita Popov 2022-04-19 15:02:43 +02:00
parent 57717eb8ad
commit 25286dda2b
2 changed files with 11 additions and 0 deletions

View file

@ -523,6 +523,12 @@ pub(crate) unsafe fn optimize(
let module_name = module.name.clone();
let module_name = Some(&module_name[..]);
if let Some(false) = config.new_llvm_pass_manager && llvm_util::get_version() >= (15, 0, 0) {
diag_handler.warn(
"ignoring `-Z new-llvm-pass-manager=no`, which is no longer supported with LLVM 15",
);
}
if config.emit_no_opt_bc {
let out = cgcx.output_filenames.temp_path_ext("no-opt.bc", module_name);
let out = path_to_c_string(&out);