]>
git.proxmox.com Git - rustc.git/blob - compiler/rustc_codegen_ssa/src/traits/misc.rs
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
;
8 pub trait MiscMethods
<'tcx
>: BackendTypes
{
11 ) -> &RefCell
<FxHashMap
<(Ty
<'tcx
>, Option
<ty
::PolyExistentialTraitRef
<'tcx
>>), Self::Value
>>;
12 fn check_overflow(&self) -> bool
;
13 fn get_fn(&self, instance
: Instance
<'tcx
>) -> Self::Function
;
14 fn get_fn_addr(&self, instance
: Instance
<'tcx
>) -> Self::Value
;
15 fn eh_personality(&self) -> Self::Value
;
16 fn sess(&self) -> &Session
;
17 fn codegen_unit(&self) -> &'tcx CodegenUnit
<'tcx
>;
18 fn used_statics(&self) -> &RefCell
<Vec
<Self::Value
>>;
19 fn set_frame_pointer_elimination(&self, llfn
: Self::Function
);
20 fn apply_target_cpu_attr(&self, llfn
: Self::Function
);
21 fn create_used_variable(&self);
22 /// Declares the extern "C" main function for the entry point. Returns None if the symbol already exists.
23 fn declare_c_main(&self, fn_type
: Self::Type
) -> Option
<Self::Function
>;