about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbjorn3 <bjorn3@users.noreply.github.com>2018-11-24 17:11:59 +0100
committerbjorn3 <bjorn3@users.noreply.github.com>2018-11-29 18:19:43 +0100
commit59682d3e2ae1b173a29aff25d30afe49349379de (patch)
treed1d5fac94e873b9dc241357448e6d5fca65f8a98
parentb8d55d45ceea7badad35ec4cc9df63ac5326ebb2 (diff)
downloadrust-59682d3e2ae1b173a29aff25d30afe49349379de.tar.gz
rust-59682d3e2ae1b173a29aff25d30afe49349379de.zip
Remove static_bitcast from cg_ssa
-rw-r--r--src/librustc_codegen_llvm/consts.rs15
-rw-r--r--src/librustc_codegen_ssa/traits/statics.rs1
2 files changed, 8 insertions, 8 deletions
diff --git a/src/librustc_codegen_llvm/consts.rs b/src/librustc_codegen_llvm/consts.rs
index 47899d426f7..d9afded6834 100644
--- a/src/librustc_codegen_llvm/consts.rs
+++ b/src/librustc_codegen_llvm/consts.rs
@@ -171,17 +171,18 @@ pub fn ptrcast(val: &'ll Value, ty: &'ll Type) -> &'ll Value {
     }
 }
 
-impl StaticMethods for CodegenCx<'ll, 'tcx> {
-
-    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 {
+impl CodegenCx<'ll, 'tcx> {
+    crate fn static_bitcast(&self, val: &'ll Value, ty: &'ll Type) -> &'ll Value {
         unsafe {
             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(
         &self,
diff --git a/src/librustc_codegen_ssa/traits/statics.rs b/src/librustc_codegen_ssa/traits/statics.rs
index aa4d69f078f..7ea90dfcce0 100644
--- a/src/librustc_codegen_ssa/traits/statics.rs
+++ b/src/librustc_codegen_ssa/traits/statics.rs
@@ -14,7 +14,6 @@ use rustc::ty::layout::Align;
 
 pub trait StaticMethods: BackendTypes {
     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(&self, cv: Self::Value, align: Align, kind: Option<&str>) -> Self::Value;
     fn get_static(&self, def_id: DefId) -> Self::Value;