diff options
| author | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2025-07-06 15:57:20 +0000 |
|---|---|---|
| committer | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2025-07-21 07:58:44 +0000 |
| commit | 6e757354ada32657886a9ec944c389cb93b9c919 (patch) | |
| tree | 689c560aa80b8f3381a6fab2f677240b4e732b99 /compiler/rustc_codegen_llvm | |
| parent | 1c8dc6f4405124b092dc534d17d4b13f29a4adae (diff) | |
| download | rust-6e757354ada32657886a9ec944c389cb93b9c919.tar.gz rust-6e757354ada32657886a9ec944c389cb93b9c919.zip | |
Merge exported_symbols computation into exported_symbols_for_lto
And move exported_symbols_for_lto call from backends to cg_ssa.
Diffstat (limited to 'compiler/rustc_codegen_llvm')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/back/lto.rs | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/compiler/rustc_codegen_llvm/src/back/lto.rs b/compiler/rustc_codegen_llvm/src/back/lto.rs index 633a944005e..4abf9b6842a 100644 --- a/compiler/rustc_codegen_llvm/src/back/lto.rs +++ b/compiler/rustc_codegen_llvm/src/back/lto.rs @@ -7,9 +7,7 @@ use std::sync::Arc; use std::{io, iter, slice}; use object::read::archive::ArchiveFile; -use rustc_codegen_ssa::back::lto::{ - SerializedModule, ThinModule, ThinShared, exported_symbols_for_lto, -}; +use rustc_codegen_ssa::back::lto::{SerializedModule, ThinModule, ThinShared}; use rustc_codegen_ssa::back::write::{CodegenContext, FatLtoInput}; use rustc_codegen_ssa::traits::*; use rustc_codegen_ssa::{ModuleCodegen, ModuleKind, looks_like_rust_object_file}; @@ -37,9 +35,10 @@ fn prepare_lto( cgcx: &CodegenContext<LlvmCodegenBackend>, dcx: DiagCtxtHandle<'_>, ) -> Result<(Vec<CString>, Vec<(SerializedModule<ModuleBuffer>, CString)>), FatalError> { - let mut symbols_below_threshold = exported_symbols_for_lto(cgcx, dcx)? - .into_iter() - .map(|symbol| CString::new(symbol).unwrap()) + let mut symbols_below_threshold = cgcx + .exported_symbols_for_lto + .iter() + .map(|symbol| CString::new(symbol.to_owned()).unwrap()) .collect::<Vec<CString>>(); // __llvm_profile_counter_bias is pulled in at link time by an undefined reference to |
