Remove static_bitcast from cg_ssa

This commit is contained in:
bjorn3 2018-11-24 17:11:59 +01:00
parent b8d55d45ce
commit 59682d3e2a
2 changed files with 8 additions and 8 deletions

View File

@ -171,17 +171,18 @@ pub fn ptrcast(val: &'ll Value, ty: &'ll Type) -> &'ll Value {
} }
} }
impl StaticMethods for CodegenCx<'ll, 'tcx> { impl CodegenCx<'ll, 'tcx> {
crate fn static_bitcast(&self, val: &'ll Value, ty: &'ll Type) -> &'ll Value {
fn static_ptrcast(&self, val: &'ll Value, ty: &'ll Type) -> &'ll Value {
ptrcast(val, ty)
}
fn static_bitcast(&self, val: &'ll Value, ty: &'ll Type) -> &'ll Value {
unsafe { unsafe {
llvm::LLVMConstBitCast(val, ty) llvm::LLVMConstBitCast(val, ty)
} }
} }
}
impl StaticMethods for CodegenCx<'ll, 'tcx> {
fn static_ptrcast(&self, val: &'ll Value, ty: &'ll Type) -> &'ll Value {
ptrcast(val, ty)
}
fn static_addr_of_mut( fn static_addr_of_mut(
&self, &self,

View File

@ -14,7 +14,6 @@ use rustc::ty::layout::Align;
pub trait StaticMethods: BackendTypes { pub trait StaticMethods: BackendTypes {
fn static_ptrcast(&self, val: Self::Value, ty: Self::Type) -> Self::Value; fn static_ptrcast(&self, val: Self::Value, ty: Self::Type) -> Self::Value;
fn static_bitcast(&self, val: Self::Value, ty: Self::Type) -> Self::Value;
fn static_addr_of_mut(&self, cv: Self::Value, align: Align, kind: Option<&str>) -> Self::Value; fn static_addr_of_mut(&self, cv: Self::Value, align: Align, kind: Option<&str>) -> Self::Value;
fn static_addr_of(&self, cv: Self::Value, align: Align, kind: Option<&str>) -> Self::Value; fn static_addr_of(&self, cv: Self::Value, align: Align, kind: Option<&str>) -> Self::Value;
fn get_static(&self, def_id: DefId) -> Self::Value; fn get_static(&self, def_id: DefId) -> Self::Value;