1
Fork 0

Rollup merge of #91931 - LegionMammal978:less-inband-codegen_llvm, r=davidtwco

Remove `in_band_lifetimes` from `rustc_codegen_llvm`

See #91867 for more information.

This one took a while. This crate has dozens of functions not associated with any type, and most of them were using in-band lifetimes for `'ll` and `'tcx`.
This commit is contained in:
Matthias Krüger 2021-12-18 14:49:40 +01:00 committed by GitHub
commit ca3d129ee3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
28 changed files with 429 additions and 392 deletions

View file

@ -363,7 +363,7 @@ fn fat_lto(
crate struct Linker<'a>(&'a mut llvm::Linker<'a>);
impl Linker<'a> {
impl<'a> Linker<'a> {
crate fn new(llmod: &'a llvm::Module) -> Self {
unsafe { Linker(llvm::LLVMRustLinkerNew(llmod)) }
}
@ -383,7 +383,7 @@ impl Linker<'a> {
}
}
impl Drop for Linker<'a> {
impl Drop for Linker<'_> {
fn drop(&mut self) {
unsafe {
llvm::LLVMRustLinkerFree(&mut *(self.0 as *mut _));

View file

@ -46,7 +46,7 @@ pub fn llvm_err(handler: &rustc_errors::Handler, msg: &str) -> FatalError {
}
}
pub fn write_output_file(
pub fn write_output_file<'ll>(
handler: &rustc_errors::Handler,
target: &'ll llvm::TargetMachine,
pm: &llvm::PassManager<'ll>,