diff options
| author | bors <bors@rust-lang.org> | 2023-07-17 02:56:10 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-07-17 02:56:10 +0000 |
| commit | 299179e69457125e77be1489531bca0b9ee1af48 (patch) | |
| tree | ac3c7683fbfcaeb0c13b77c5088edf6abdd7d8d0 /compiler/rustc_codegen_cranelift/src | |
| parent | 4c7af429f3122cbde3df648783e9b4d31cd62525 (diff) | |
| parent | 005a70e3034eb84798760d3ccbf46eda65b40075 (diff) | |
| download | rust-299179e69457125e77be1489531bca0b9ee1af48.tar.gz rust-299179e69457125e77be1489531bca0b9ee1af48.zip | |
Auto merge of #113772 - nnethercote:streamline-size-estimates-2, r=wesleywiser
Streamline size estimates (take 2) This was merged in #113684 but then [something happened](https://github.com/rust-lang/rust/pull/113684#issuecomment-1636811985): > There has been a bors issue that lead to the merge commit of this PR getting purged from master. > You'll have to make a new PR to reapply it. So this is exactly the same changes. `@bors` r=wesleywiser
Diffstat (limited to 'compiler/rustc_codegen_cranelift/src')
| -rw-r--r-- | compiler/rustc_codegen_cranelift/src/driver/mod.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/compiler/rustc_codegen_cranelift/src/driver/mod.rs b/compiler/rustc_codegen_cranelift/src/driver/mod.rs index 5c52c9c18ad..12e90b58410 100644 --- a/compiler/rustc_codegen_cranelift/src/driver/mod.rs +++ b/compiler/rustc_codegen_cranelift/src/driver/mod.rs @@ -5,7 +5,7 @@ //! [`codegen_static`]: crate::constant::codegen_static use rustc_data_structures::profiling::SelfProfilerRef; -use rustc_middle::mir::mono::{Linkage as RLinkage, MonoItem, Visibility}; +use rustc_middle::mir::mono::{MonoItem, MonoItemData}; use crate::prelude::*; @@ -16,11 +16,11 @@ pub(crate) mod jit; fn predefine_mono_items<'tcx>( tcx: TyCtxt<'tcx>, module: &mut dyn Module, - mono_items: &[(MonoItem<'tcx>, (RLinkage, Visibility))], + mono_items: &[(MonoItem<'tcx>, MonoItemData)], ) { tcx.prof.generic_activity("predefine functions").run(|| { let is_compiler_builtins = tcx.is_compiler_builtins(LOCAL_CRATE); - for &(mono_item, (linkage, visibility)) in mono_items { + for &(mono_item, data) in mono_items { match mono_item { MonoItem::Fn(instance) => { let name = tcx.symbol_name(instance).name; @@ -29,8 +29,8 @@ fn predefine_mono_items<'tcx>( get_function_sig(tcx, module.target_config().default_call_conv, instance); let linkage = crate::linkage::get_clif_linkage( mono_item, - linkage, - visibility, + data.linkage, + data.visibility, is_compiler_builtins, ); module.declare_function(name, linkage, &sig).unwrap(); |
