Reformat using the new identifier sorting from rustfmt

This commit is contained in:
Michael Goulet
2024-09-22 19:05:04 -04:00
parent 1173204b36
commit c682aa162b
1455 changed files with 7152 additions and 8384 deletions

View File

@@ -6,8 +6,8 @@ use gimli::write::{Address, AttributeValue, EndianVec, Result, Sections, Writer}
use gimli::{RunTimeEndian, SectionId};
use rustc_data_structures::fx::FxHashMap;
use super::object::WriteDebugInfo;
use super::DebugContext;
use super::object::WriteDebugInfo;
pub(super) fn address_for_func(func_id: FuncId) -> Address {
let symbol = func_id.as_u32();

View File

@@ -3,15 +3,15 @@
use std::ffi::OsStr;
use std::path::{Component, Path};
use cranelift_codegen::binemit::CodeOffset;
use cranelift_codegen::MachSrcLoc;
use cranelift_codegen::binemit::CodeOffset;
use gimli::write::{AttributeValue, FileId, FileInfo, LineProgram, LineString, LineStringTable};
use rustc_span::{
hygiene, FileName, Pos, SourceFile, SourceFileAndLine, SourceFileHash, SourceFileHashAlgorithm,
FileName, Pos, SourceFile, SourceFileAndLine, SourceFileHash, SourceFileHashAlgorithm, hygiene,
};
use crate::debuginfo::emit::address_for_func;
use crate::debuginfo::FunctionDebugContext;
use crate::debuginfo::emit::address_for_func;
use crate::prelude::*;
// OPTIMIZATION: It is cheaper to do this in one pass than using `.parent()` and `.file_name()`.

View File

@@ -73,19 +73,16 @@ impl WriteDebugInfo for ObjectProduct {
}
};
self.object
.add_relocation(
from.0,
Relocation {
offset: u64::from(reloc.offset),
symbol,
flags: RelocationFlags::Generic {
kind: reloc.kind,
encoding: RelocationEncoding::Generic,
size: reloc.size * 8,
},
addend: i64::try_from(symbol_offset).unwrap() + reloc.addend,
.add_relocation(from.0, Relocation {
offset: u64::from(reloc.offset),
symbol,
flags: RelocationFlags::Generic {
kind: reloc.kind,
encoding: RelocationEncoding::Generic,
size: reloc.size * 8,
},
)
addend: i64::try_from(symbol_offset).unwrap() + reloc.addend,
})
.unwrap();
}
}

View File

@@ -6,7 +6,7 @@ use rustc_data_structures::fx::FxHashMap;
use rustc_middle::ty::layout::LayoutOf;
use rustc_middle::ty::{self, Ty, TyCtxt};
use crate::{has_ptr_meta, DebugContext, RevealAllLayoutCx};
use crate::{DebugContext, RevealAllLayoutCx, has_ptr_meta};
#[derive(Default)]
pub(crate) struct TypeDebugContext<'tcx> {

View File

@@ -1,11 +1,11 @@
//! Unwind info generation (`.eh_frame`)
use cranelift_codegen::ir::Endianness;
use cranelift_codegen::isa::unwind::UnwindInfo;
use cranelift_codegen::isa::TargetIsa;
use cranelift_codegen::isa::unwind::UnwindInfo;
use cranelift_object::ObjectProduct;
use gimli::write::{CieId, EhFrame, FrameTable, Section};
use gimli::RunTimeEndian;
use gimli::write::{CieId, EhFrame, FrameTable, Section};
use super::emit::address_for_func;
use super::object::WriteDebugInfo;