Generalized mono_item.rs and base.rs:codegen_instance

This commit is contained in:
Denis Merigoux
2018-09-21 16:13:15 +02:00
committed by Eduard-Mihai Burtescu
parent 6a993fe353
commit 441a7c1092
6 changed files with 136 additions and 90 deletions

View File

@@ -10,10 +10,13 @@
use super::backend::Backend;
use libc::c_uint;
use monomorphize::partitioning::CodegenUnit;
use rustc::mir::mono::Stats;
use rustc::session::Session;
use rustc::ty::{self, Instance, Ty};
use rustc::util::nodemap::FxHashMap;
use std::cell::RefCell;
use std::sync::Arc;
pub trait MiscMethods<'tcx>: Backend<'tcx> {
fn vtables(
@@ -26,4 +29,6 @@ pub trait MiscMethods<'tcx>: Backend<'tcx> {
fn eh_personality(&self) -> Self::Value;
fn eh_unwind_resume(&self) -> Self::Value;
fn sess(&self) -> &Session;
fn stats(&self) -> &RefCell<Stats>;
fn codegen_unit(&self) -> &Arc<CodegenUnit<'tcx>>;
}