Removed use of iteration through a HashMap/HashSet in rustc_incremental and replaced with IndexMap/IndexSet
This commit is contained in:
@@ -9,7 +9,7 @@ use crate::{
|
||||
};
|
||||
use jobserver::{Acquired, Client};
|
||||
use rustc_ast::attr;
|
||||
use rustc_data_structures::fx::FxHashMap;
|
||||
use rustc_data_structures::fx::{FxHashMap, FxIndexMap};
|
||||
use rustc_data_structures::memmap::Mmap;
|
||||
use rustc_data_structures::profiling::SelfProfilerRef;
|
||||
use rustc_data_structures::profiling::TimingGuard;
|
||||
@@ -498,8 +498,8 @@ pub fn start_async_codegen<B: ExtraBackendMethods>(
|
||||
fn copy_all_cgu_workproducts_to_incr_comp_cache_dir(
|
||||
sess: &Session,
|
||||
compiled_modules: &CompiledModules,
|
||||
) -> FxHashMap<WorkProductId, WorkProduct> {
|
||||
let mut work_products = FxHashMap::default();
|
||||
) -> FxIndexMap<WorkProductId, WorkProduct> {
|
||||
let mut work_products = FxIndexMap::default();
|
||||
|
||||
if sess.opts.incremental.is_none() {
|
||||
return work_products;
|
||||
@@ -1885,7 +1885,7 @@ pub struct OngoingCodegen<B: ExtraBackendMethods> {
|
||||
}
|
||||
|
||||
impl<B: ExtraBackendMethods> OngoingCodegen<B> {
|
||||
pub fn join(self, sess: &Session) -> (CodegenResults, FxHashMap<WorkProductId, WorkProduct>) {
|
||||
pub fn join(self, sess: &Session) -> (CodegenResults, FxIndexMap<WorkProductId, WorkProduct>) {
|
||||
let _timer = sess.timer("finish_ongoing_codegen");
|
||||
|
||||
self.shared_emitter_main.check(sess, true);
|
||||
|
||||
Reference in New Issue
Block a user