Skip to content

Commit 7c540e5

Browse files
committed
Use WorkProductMap instead of FxIndexMap
This is an UnordMap internally. Iteration order for the work product map should not matter aside from the place it is serialized where sorting by WorkProductId is sufficient.
1 parent b734647 commit 7c540e5

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ use cranelift_codegen::settings::{self, Configurable};
4040
use rustc_codegen_ssa::traits::CodegenBackend;
4141
use rustc_codegen_ssa::{CompiledModules, CrateInfo, TargetConfig, back};
4242
use rustc_log::tracing::info;
43-
use rustc_middle::dep_graph::{WorkProduct, WorkProductId};
43+
use rustc_middle::dep_graph::WorkProductMap;
4444
use rustc_session::Session;
4545
use rustc_session::config::OutputFilenames;
4646
use rustc_span::{Symbol, sym};
@@ -88,7 +88,7 @@ mod prelude {
8888
};
8989
pub(crate) use cranelift_module::{self, DataDescription, FuncId, Linkage, Module};
9090
pub(crate) use rustc_abi::{BackendRepr, FIRST_VARIANT, FieldIdx, Scalar, Size, VariantIdx};
91-
pub(crate) use rustc_data_structures::fx::{FxHashMap, FxIndexMap};
91+
pub(crate) use rustc_data_structures::fx::FxHashMap;
9292
pub(crate) use rustc_hir::def_id::{DefId, LOCAL_CRATE};
9393
pub(crate) use rustc_index::Idx;
9494
pub(crate) use rustc_middle::mir::{self, *};
@@ -235,7 +235,7 @@ impl CodegenBackend for CraneliftCodegenBackend {
235235
sess: &Session,
236236
_outputs: &OutputFilenames,
237237
crate_info: &CrateInfo,
238-
) -> (CompiledModules, FxIndexMap<WorkProductId, WorkProduct>) {
238+
) -> (CompiledModules, WorkProductMap) {
239239
ongoing_codegen
240240
.downcast::<rustc_codegen_ssa::back::write::OngoingCodegen<driver::aot::AotDriver>>()
241241
.unwrap()

0 commit comments

Comments
 (0)