This commit is contained in:
bjorn3 2021-10-27 14:05:12 +02:00
commit bf907a3de1
4 changed files with 6 additions and 8 deletions

View file

@ -1,10 +1,10 @@
#![feature(start, core_intrinsics, alloc_prelude, alloc_error_handler, box_syntax)]
#![feature(start, core_intrinsics, alloc_error_handler, box_syntax)]
#![no_std]
extern crate alloc;
extern crate alloc_system;
use alloc::prelude::v1::*;
use alloc::boxed::Box;
use alloc_system::System;

View file

@ -309,13 +309,13 @@ pub(crate) fn codegen_terminator_call<'tcx>(
span: Span,
func: &Operand<'tcx>,
args: &[Operand<'tcx>],
destination: Option<(Place<'tcx>, BasicBlock)>,
mir_dest: Option<(Place<'tcx>, BasicBlock)>,
) {
let fn_ty = fx.monomorphize(func.ty(fx.mir, fx.tcx));
let fn_sig =
fx.tcx.normalize_erasing_late_bound_regions(ParamEnv::reveal_all(), fn_ty.fn_sig(fx.tcx));
let destination = destination.map(|(place, bb)| (codegen_place(fx, place), bb));
let destination = mir_dest.map(|(place, bb)| (codegen_place(fx, place), bb));
// Handle special calls like instrinsics and empty drop glue.
let instance = if let ty::FnDef(def_id, substs) = *fn_ty.kind() {

View file

@ -224,7 +224,7 @@ pub(crate) fn run_aot(
tcx,
(backend_config.clone(), cgu.name()),
module_codegen,
rustc_middle::dep_graph::hash_result,
Some(rustc_middle::dep_graph::hash_result),
);
if let Some((id, product)) = work_product {

View file

@ -407,11 +407,9 @@ pub(crate) fn codegen_intrinsic_call<'tcx>(
destination: Option<(CPlace<'tcx>, BasicBlock)>,
span: Span,
) {
let def_id = instance.def_id();
let intrinsic = fx.tcx.item_name(instance.def_id());
let substs = instance.substs;
let intrinsic = fx.tcx.item_name(def_id);
let ret = match destination {
Some((place, _)) => place,
None => {