Run rustfmt --file-lines ... for changes from previous commits.
This commit is contained in:
parent
21ac960334
commit
fff08cb043
176 changed files with 2212 additions and 2132 deletions
|
|
@ -44,7 +44,7 @@ use crate::value::Value;
|
|||
pub fn write_compressed_metadata<'a, 'gcx>(
|
||||
tcx: TyCtxt<'gcx, 'gcx>,
|
||||
metadata: &EncodedMetadata,
|
||||
llvm_module: &mut ModuleLlvm
|
||||
llvm_module: &mut ModuleLlvm,
|
||||
) {
|
||||
use std::io::Write;
|
||||
use flate2::Compression;
|
||||
|
|
|
|||
|
|
@ -47,8 +47,8 @@ pub struct CodegenCx<'ll, 'tcx: 'll> {
|
|||
/// Cache instances of monomorphic and polymorphic items
|
||||
pub instances: RefCell<FxHashMap<Instance<'tcx>, &'ll Value>>,
|
||||
/// Cache generated vtables
|
||||
pub vtables: RefCell<FxHashMap<
|
||||
(Ty<'tcx>, Option<ty::PolyExistentialTraitRef<'tcx>>), &'ll Value>>,
|
||||
pub vtables:
|
||||
RefCell<FxHashMap<(Ty<'tcx>, Option<ty::PolyExistentialTraitRef<'tcx>>), &'ll Value>>,
|
||||
/// Cache of constant strings,
|
||||
pub const_cstr_cache: RefCell<FxHashMap<LocalInternedString, &'ll Value>>,
|
||||
|
||||
|
|
@ -207,10 +207,11 @@ pub unsafe fn create_module(
|
|||
}
|
||||
|
||||
impl<'ll, 'tcx> CodegenCx<'ll, 'tcx> {
|
||||
crate fn new(tcx: TyCtxt<'tcx, 'tcx>,
|
||||
codegen_unit: Arc<CodegenUnit<'tcx>>,
|
||||
llvm_module: &'ll crate::ModuleLlvm)
|
||||
-> Self {
|
||||
crate fn new(
|
||||
tcx: TyCtxt<'tcx, 'tcx>,
|
||||
codegen_unit: Arc<CodegenUnit<'tcx>>,
|
||||
llvm_module: &'ll crate::ModuleLlvm,
|
||||
) -> Self {
|
||||
// An interesting part of Windows which MSVC forces our hand on (and
|
||||
// apparently MinGW didn't) is the usage of `dllimport` and `dllexport`
|
||||
// attributes in LLVM IR as well as native dependencies (in C these
|
||||
|
|
|
|||
|
|
@ -894,10 +894,11 @@ fn pointer_type_metadata(
|
|||
}
|
||||
}
|
||||
|
||||
pub fn compile_unit_metadata(tcx: TyCtxt<'_, '_>,
|
||||
codegen_unit_name: &str,
|
||||
debug_context: &CrateDebugContext<'ll, '_>)
|
||||
-> &'ll DIDescriptor {
|
||||
pub fn compile_unit_metadata(
|
||||
tcx: TyCtxt<'_, '_>,
|
||||
codegen_unit_name: &str,
|
||||
debug_context: &CrateDebugContext<'ll, '_>,
|
||||
) -> &'ll DIDescriptor {
|
||||
let mut name_in_debuginfo = match tcx.sess.local_crate_source_file {
|
||||
Some(ref path) => path.clone(),
|
||||
None => PathBuf::from(&*tcx.crate_name(LOCAL_CRATE).as_str()),
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ impl ExtraBackendMethods for LlvmCodegenBackend {
|
|||
&self,
|
||||
tcx: TyCtxt<'gcx, 'gcx>,
|
||||
metadata: &EncodedMetadata,
|
||||
llvm_module: &mut ModuleLlvm
|
||||
llvm_module: &mut ModuleLlvm,
|
||||
) {
|
||||
base::write_compressed_metadata(tcx, metadata, llvm_module)
|
||||
}
|
||||
|
|
@ -119,7 +119,7 @@ impl ExtraBackendMethods for LlvmCodegenBackend {
|
|||
&self,
|
||||
tcx: TyCtxt<'gcx, 'gcx>,
|
||||
mods: &mut ModuleLlvm,
|
||||
kind: AllocatorKind
|
||||
kind: AllocatorKind,
|
||||
) {
|
||||
unsafe { allocator::codegen(tcx, mods, kind) }
|
||||
}
|
||||
|
|
@ -289,7 +289,7 @@ impl CodegenBackend for LlvmCodegenBackend {
|
|||
tcx: TyCtxt<'tcx, 'tcx>,
|
||||
metadata: EncodedMetadata,
|
||||
need_metadata_module: bool,
|
||||
rx: mpsc::Receiver<Box<dyn Any + Send>>
|
||||
rx: mpsc::Receiver<Box<dyn Any + Send>>,
|
||||
) -> Box<dyn Any> {
|
||||
box rustc_codegen_ssa::base::codegen_crate(
|
||||
LlvmCodegenBackend(()), tcx, metadata, need_metadata_module, rx)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue