Skip to content

Commit e891872

Browse files
committed
Remove static_bitcast from cg_ssa
1 parent c092c02 commit e891872

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/librustc_codegen_llvm/consts.rs

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -171,17 +171,18 @@ pub fn ptrcast(val: &'ll Value, ty: &'ll Type) -> &'ll Value {
171171
}
172172
}
173173

174-
impl StaticMethods for CodegenCx<'ll, 'tcx> {
175-
176-
fn static_ptrcast(&self, val: &'ll Value, ty: &'ll Type) -> &'ll Value {
177-
ptrcast(val, ty)
178-
}
179-
180-
fn static_bitcast(&self, val: &'ll Value, ty: &'ll Type) -> &'ll Value {
174+
impl CodegenCx<'ll, 'tcx> {
175+
crate fn static_bitcast(&self, val: &'ll Value, ty: &'ll Type) -> &'ll Value {
181176
unsafe {
182177
llvm::LLVMConstBitCast(val, ty)
183178
}
184179
}
180+
}
181+
182+
impl StaticMethods for CodegenCx<'ll, 'tcx> {
183+
fn static_ptrcast(&self, val: &'ll Value, ty: &'ll Type) -> &'ll Value {
184+
ptrcast(val, ty)
185+
}
185186

186187
fn static_addr_of_mut(
187188
&self,

src/librustc_codegen_ssa/traits/statics.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ use rustc::ty::layout::Align;
1414

1515
pub trait StaticMethods: BackendTypes {
1616
fn static_ptrcast(&self, val: Self::Value, ty: Self::Type) -> Self::Value;
17-
fn static_bitcast(&self, val: Self::Value, ty: Self::Type) -> Self::Value;
1817
fn static_addr_of_mut(&self, cv: Self::Value, align: Align, kind: Option<&str>) -> Self::Value;
1918
fn static_addr_of(&self, cv: Self::Value, align: Align, kind: Option<&str>) -> Self::Value;
2019
fn get_static(&self, def_id: DefId) -> Self::Value;

0 commit comments

Comments
 (0)