1 use super::BackendTypes;
2 use rustc::mir::mono::CodegenUnit;
3 use rustc::ty::{self, Instance, Ty};
4 use rustc_data_structures::fx::FxHashMap;
5 use rustc_session::Session;
6 use std::cell::RefCell;
9 pub trait MiscMethods<'tcx>: BackendTypes {
12 ) -> &RefCell<FxHashMap<(Ty<'tcx>, Option<ty::PolyExistentialTraitRef<'tcx>>), Self::Value>>;
13 fn check_overflow(&self) -> bool;
14 fn get_fn(&self, instance: Instance<'tcx>) -> Self::Function;
15 fn get_fn_addr(&self, instance: Instance<'tcx>) -> Self::Value;
16 fn eh_personality(&self) -> Self::Value;
17 fn sess(&self) -> &Session;
18 fn codegen_unit(&self) -> &Arc<CodegenUnit<'tcx>>;
19 fn used_statics(&self) -> &RefCell<Vec<Self::Value>>;
20 fn set_frame_pointer_elimination(&self, llfn: Self::Function);
21 fn apply_target_cpu_attr(&self, llfn: Self::Function);
22 fn create_used_variable(&self);