diff options
| author | Michael Woerister <michaelwoerister@posteo> | 2023-01-17 12:05:01 +0100 |
|---|---|---|
| committer | Michael Woerister <michaelwoerister@posteo> | 2023-01-19 10:40:47 +0100 |
| commit | c3d25731207e466fc20b00124a5aadd435d3b885 (patch) | |
| tree | 77aa0c3f673405aa4fb89b5e08798624264a468b /compiler/rustc_codegen_ssa | |
| parent | 8a1de57a4aaf4ff13d20fdbc162064f237bb7679 (diff) | |
| download | rust-c3d25731207e466fc20b00124a5aadd435d3b885.tar.gz rust-c3d25731207e466fc20b00124a5aadd435d3b885.zip | |
Use UnordMap instead of FxHashMap in define_id_collections!().
Diffstat (limited to 'compiler/rustc_codegen_ssa')
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/back/symbol_export.rs | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/compiler/rustc_codegen_ssa/src/back/symbol_export.rs b/compiler/rustc_codegen_ssa/src/back/symbol_export.rs index 8cb7d74b90d..b442483346d 100644 --- a/compiler/rustc_codegen_ssa/src/back/symbol_export.rs +++ b/compiler/rustc_codegen_ssa/src/back/symbol_export.rs @@ -173,11 +173,15 @@ fn exported_symbols_provider_local( return &[]; } - let mut symbols: Vec<_> = tcx - .reachable_non_generics(LOCAL_CRATE) - .iter() - .map(|(&def_id, &info)| (ExportedSymbol::NonGeneric(def_id), info)) - .collect(); + // FIXME: Sorting this is unnecessary since we are sorting later anyway. + // Can we skip the later sorting? + let mut symbols: Vec<_> = tcx.with_stable_hashing_context(|hcx| { + tcx.reachable_non_generics(LOCAL_CRATE) + .to_sorted(&hcx) + .into_iter() + .map(|(&def_id, &info)| (ExportedSymbol::NonGeneric(def_id), info)) + .collect() + }); if tcx.entry_fn(()).is_some() { let exported_symbol = |
