Updated cranelift codegen to reflect modified trait signature
This commit is contained in:
parent
17412bae30
commit
204e2bf5a4
3 changed files with 6 additions and 6 deletions
|
@ -54,8 +54,8 @@ impl OngoingCodegen {
|
||||||
self,
|
self,
|
||||||
sess: &Session,
|
sess: &Session,
|
||||||
backend_config: &BackendConfig,
|
backend_config: &BackendConfig,
|
||||||
) -> (CodegenResults, FxHashMap<WorkProductId, WorkProduct>) {
|
) -> (CodegenResults, FxIndexMap<WorkProductId, WorkProduct>) {
|
||||||
let mut work_products = FxHashMap::default();
|
let mut work_products = FxIndexMap::default();
|
||||||
let mut modules = vec![];
|
let mut modules = vec![];
|
||||||
|
|
||||||
for module_codegen in self.modules {
|
for module_codegen in self.modules {
|
||||||
|
|
|
@ -88,7 +88,7 @@ mod prelude {
|
||||||
};
|
};
|
||||||
pub(crate) use rustc_target::abi::{Abi, FieldIdx, Scalar, Size, VariantIdx, FIRST_VARIANT};
|
pub(crate) use rustc_target::abi::{Abi, FieldIdx, Scalar, Size, VariantIdx, FIRST_VARIANT};
|
||||||
|
|
||||||
pub(crate) use rustc_data_structures::fx::FxHashMap;
|
pub(crate) use rustc_data_structures::fx::{FxHashMap, FxIndexMap};
|
||||||
|
|
||||||
pub(crate) use rustc_index::Idx;
|
pub(crate) use rustc_index::Idx;
|
||||||
|
|
||||||
|
@ -223,7 +223,7 @@ impl CodegenBackend for CraneliftCodegenBackend {
|
||||||
ongoing_codegen: Box<dyn Any>,
|
ongoing_codegen: Box<dyn Any>,
|
||||||
sess: &Session,
|
sess: &Session,
|
||||||
_outputs: &OutputFilenames,
|
_outputs: &OutputFilenames,
|
||||||
) -> Result<(CodegenResults, FxHashMap<WorkProductId, WorkProduct>), ErrorGuaranteed> {
|
) -> Result<(CodegenResults, FxIndexMap<WorkProductId, WorkProduct>), ErrorGuaranteed> {
|
||||||
Ok(ongoing_codegen
|
Ok(ongoing_codegen
|
||||||
.downcast::<driver::aot::OngoingCodegen>()
|
.downcast::<driver::aot::OngoingCodegen>()
|
||||||
.unwrap()
|
.unwrap()
|
||||||
|
|
|
@ -75,7 +75,7 @@ use rustc_codegen_ssa::back::write::{CodegenContext, FatLTOInput, ModuleConfig,
|
||||||
use rustc_codegen_ssa::back::lto::{LtoModuleCodegen, SerializedModule, ThinModule};
|
use rustc_codegen_ssa::back::lto::{LtoModuleCodegen, SerializedModule, ThinModule};
|
||||||
use rustc_codegen_ssa::target_features::supported_target_features;
|
use rustc_codegen_ssa::target_features::supported_target_features;
|
||||||
use rustc_codegen_ssa::traits::{CodegenBackend, ExtraBackendMethods, ModuleBufferMethods, ThinBufferMethods, WriteBackendMethods};
|
use rustc_codegen_ssa::traits::{CodegenBackend, ExtraBackendMethods, ModuleBufferMethods, ThinBufferMethods, WriteBackendMethods};
|
||||||
use rustc_data_structures::fx::FxHashMap;
|
use rustc_data_structures::fx::FxIndexMap;
|
||||||
use rustc_errors::{DiagnosticMessage, ErrorGuaranteed, Handler, SubdiagnosticMessage};
|
use rustc_errors::{DiagnosticMessage, ErrorGuaranteed, Handler, SubdiagnosticMessage};
|
||||||
use rustc_fluent_macro::fluent_messages;
|
use rustc_fluent_macro::fluent_messages;
|
||||||
use rustc_metadata::EncodedMetadata;
|
use rustc_metadata::EncodedMetadata;
|
||||||
|
@ -137,7 +137,7 @@ impl CodegenBackend for GccCodegenBackend {
|
||||||
Box::new(res)
|
Box::new(res)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn join_codegen(&self, ongoing_codegen: Box<dyn Any>, sess: &Session, _outputs: &OutputFilenames) -> Result<(CodegenResults, FxHashMap<WorkProductId, WorkProduct>), ErrorGuaranteed> {
|
fn join_codegen(&self, ongoing_codegen: Box<dyn Any>, sess: &Session, _outputs: &OutputFilenames) -> Result<(CodegenResults, FxIndexMap<WorkProductId, WorkProduct>), ErrorGuaranteed> {
|
||||||
let (codegen_results, work_products) = ongoing_codegen
|
let (codegen_results, work_products) = ongoing_codegen
|
||||||
.downcast::<rustc_codegen_ssa::back::write::OngoingCodegen<GccCodegenBackend>>()
|
.downcast::<rustc_codegen_ssa::back::write::OngoingCodegen<GccCodegenBackend>>()
|
||||||
.expect("Expected GccCodegenBackend's OngoingCodegen, found Box<Any>")
|
.expect("Expected GccCodegenBackend's OngoingCodegen, found Box<Any>")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue