Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 204e2bf

Browse files
committed
Updated cranelift codegen to reflect modified trait signature
1 parent 17412ba commit 204e2bf

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

compiler/rustc_codegen_cranelift/src/driver/aot.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ impl OngoingCodegen {
5454
self,
5555
sess: &Session,
5656
backend_config: &BackendConfig,
57-
) -> (CodegenResults, FxHashMap<WorkProductId, WorkProduct>) {
58-
let mut work_products = FxHashMap::default();
57+
) -> (CodegenResults, FxIndexMap<WorkProductId, WorkProduct>) {
58+
let mut work_products = FxIndexMap::default();
5959
let mut modules = vec![];
6060

6161
for module_codegen in self.modules {

compiler/rustc_codegen_cranelift/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ mod prelude {
8888
};
8989
pub(crate) use rustc_target::abi::{Abi, FieldIdx, Scalar, Size, VariantIdx, FIRST_VARIANT};
9090

91-
pub(crate) use rustc_data_structures::fx::FxHashMap;
91+
pub(crate) use rustc_data_structures::fx::{FxHashMap, FxIndexMap};
9292

9393
pub(crate) use rustc_index::Idx;
9494

@@ -223,7 +223,7 @@ impl CodegenBackend for CraneliftCodegenBackend {
223223
ongoing_codegen: Box<dyn Any>,
224224
sess: &Session,
225225
_outputs: &OutputFilenames,
226-
) -> Result<(CodegenResults, FxHashMap<WorkProductId, WorkProduct>), ErrorGuaranteed> {
226+
) -> Result<(CodegenResults, FxIndexMap<WorkProductId, WorkProduct>), ErrorGuaranteed> {
227227
Ok(ongoing_codegen
228228
.downcast::<driver::aot::OngoingCodegen>()
229229
.unwrap()

compiler/rustc_codegen_gcc/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ use rustc_codegen_ssa::back::write::{CodegenContext, FatLTOInput, ModuleConfig,
7575
use rustc_codegen_ssa::back::lto::{LtoModuleCodegen, SerializedModule, ThinModule};
7676
use rustc_codegen_ssa::target_features::supported_target_features;
7777
use rustc_codegen_ssa::traits::{CodegenBackend, ExtraBackendMethods, ModuleBufferMethods, ThinBufferMethods, WriteBackendMethods};
78-
use rustc_data_structures::fx::FxHashMap;
78+
use rustc_data_structures::fx::FxIndexMap;
7979
use rustc_errors::{DiagnosticMessage, ErrorGuaranteed, Handler, SubdiagnosticMessage};
8080
use rustc_fluent_macro::fluent_messages;
8181
use rustc_metadata::EncodedMetadata;
@@ -137,7 +137,7 @@ impl CodegenBackend for GccCodegenBackend {
137137
Box::new(res)
138138
}
139139

140-
fn join_codegen(&self, ongoing_codegen: Box<dyn Any>, sess: &Session, _outputs: &OutputFilenames) -> Result<(CodegenResults, FxHashMap<WorkProductId, WorkProduct>), ErrorGuaranteed> {
140+
fn join_codegen(&self, ongoing_codegen: Box<dyn Any>, sess: &Session, _outputs: &OutputFilenames) -> Result<(CodegenResults, FxIndexMap<WorkProductId, WorkProduct>), ErrorGuaranteed> {
141141
let (codegen_results, work_products) = ongoing_codegen
142142
.downcast::<rustc_codegen_ssa::back::write::OngoingCodegen<GccCodegenBackend>>()
143143
.expect("Expected GccCodegenBackend's OngoingCodegen, found Box<Any>")

0 commit comments

Comments
 (0)