diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2023-05-24 10:05:15 +1000 | 
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2023-05-24 10:05:15 +1000 | 
| commit | e26c0c92bda6a66a5ea2f308b28e53a0a9bfba7f (patch) | |
| tree | c2222be0d933f219e12956e6879719ff71a2084e /compiler/rustc_monomorphize/src | |
| parent | 8b4b20836b832e91aa605a2faf5e2a55190202c8 (diff) | |
| download | rust-e26c0c92bda6a66a5ea2f308b28e53a0a9bfba7f.tar.gz rust-e26c0c92bda6a66a5ea2f308b28e53a0a9bfba7f.zip | |
Inline and remove `numbered_codegen_unit_name`.
It is small and has a single call site, and this change will facilitate the next commit.
Diffstat (limited to 'compiler/rustc_monomorphize/src')
| -rw-r--r-- | compiler/rustc_monomorphize/src/partitioning/merging.rs | 11 | 
1 files changed, 3 insertions, 8 deletions
| diff --git a/compiler/rustc_monomorphize/src/partitioning/merging.rs b/compiler/rustc_monomorphize/src/partitioning/merging.rs index 5c524a18454..9ab8da1858e 100644 --- a/compiler/rustc_monomorphize/src/partitioning/merging.rs +++ b/compiler/rustc_monomorphize/src/partitioning/merging.rs @@ -98,14 +98,9 @@ pub fn merge_codegen_units<'tcx>( // If we are compiling non-incrementally we just generate simple CGU // names containing an index. for (index, cgu) in codegen_units.iter_mut().enumerate() { - cgu.set_name(numbered_codegen_unit_name(cgu_name_builder, index)); + let numbered_codegen_unit_name = + cgu_name_builder.build_cgu_name_no_mangle(LOCAL_CRATE, &["cgu"], Some(index)); + cgu.set_name(numbered_codegen_unit_name); } } } - -fn numbered_codegen_unit_name( - name_builder: &mut CodegenUnitNameBuilder<'_>, - index: usize, -) -> Symbol { - name_builder.build_cgu_name_no_mangle(LOCAL_CRATE, &["cgu"], Some(index)) -} | 
