• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 use super::BackendTypes;
2 use rustc_data_structures::fx::FxHashMap;
3 use rustc_middle::mir::mono::CodegenUnit;
4 use rustc_middle::ty::{self, Instance, Ty};
5 use rustc_session::Session;
6 use std::cell::RefCell;
7 
8 pub trait MiscMethods<'tcx>: BackendTypes {
vtables( &self, ) -> &RefCell<FxHashMap<(Ty<'tcx>, Option<ty::PolyExistentialTraitRef<'tcx>>), Self::Value>>9     fn vtables(
10         &self,
11     ) -> &RefCell<FxHashMap<(Ty<'tcx>, Option<ty::PolyExistentialTraitRef<'tcx>>), Self::Value>>;
check_overflow(&self) -> bool12     fn check_overflow(&self) -> bool;
get_fn(&self, instance: Instance<'tcx>) -> Self::Function13     fn get_fn(&self, instance: Instance<'tcx>) -> Self::Function;
get_fn_addr(&self, instance: Instance<'tcx>) -> Self::Value14     fn get_fn_addr(&self, instance: Instance<'tcx>) -> Self::Value;
eh_personality(&self) -> Self::Value15     fn eh_personality(&self) -> Self::Value;
sess(&self) -> &Session16     fn sess(&self) -> &Session;
codegen_unit(&self) -> &'tcx CodegenUnit<'tcx>17     fn codegen_unit(&self) -> &'tcx CodegenUnit<'tcx>;
set_frame_pointer_type(&self, llfn: Self::Function)18     fn set_frame_pointer_type(&self, llfn: Self::Function);
apply_target_cpu_attr(&self, llfn: Self::Function)19     fn apply_target_cpu_attr(&self, llfn: Self::Function);
20     /// Declares the extern "C" main function for the entry point. Returns None if the symbol already exists.
declare_c_main(&self, fn_type: Self::Type) -> Option<Self::Function>21     fn declare_c_main(&self, fn_type: Self::Type) -> Option<Self::Function>;
22 }
23