summary refs log tree commit diff
path: root/src/librustc_codegen_ssa/traits/statics.rs
blob: d8992c159337dc3d3490b58258328555c7bdc3f5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
use super::BackendTypes;
use syntax_pos::symbol::LocalInternedString;
use rustc::hir::def_id::DefId;
use rustc::ty::layout::Align;

pub trait StaticMethods: BackendTypes {
    fn static_addr_of(&self, cv: Self::Value, align: Align, kind: Option<&str>) -> Self::Value;
    fn codegen_static(&self, def_id: DefId, is_mutable: bool);
}

pub trait StaticBuilderMethods<'tcx>: BackendTypes {
    fn get_static(&mut self, def_id: DefId) -> Self::Value;
    fn static_panic_msg(
        &mut self,
        msg: Option<LocalInternedString>,
        filename: LocalInternedString,
        line: Self::Value,
        col: Self::Value,
        kind: &str,
    ) -> Self::Value;
}