about summary refs log tree commit diff
path: root/src/librustc_codegen_llvm/context.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-12-02 18:02:20 +0000
committerbors <bors@rust-lang.org>2018-12-02 18:02:20 +0000
commit21f26849506c141a6760532ca5bdfd8345247fdb (patch)
treea9a9bbcf59c5b72c1d90d5e1ae9d8003b659deb7 /src/librustc_codegen_llvm/context.rs
parent8660eba2b9bec5b0fe971b7281f79e79c2df2fae (diff)
parentd108a913c79660ab375aff33ea9caa2885ba3051 (diff)
downloadrust-21f26849506c141a6760532ca5bdfd8345247fdb.tar.gz
rust-21f26849506c141a6760532ca5bdfd8345247fdb.zip
Auto merge of #56198 - bjorn3:cg_ssa_refactor, r=eddyb
Refactor rustc_codegen_ssa

cc #56108 (not all things are done yet)

This removes an unsafe method from cg_ssa.

r? @eddyb
cc @sunfishcode
Diffstat (limited to 'src/librustc_codegen_llvm/context.rs')
-rw-r--r--src/librustc_codegen_llvm/context.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/librustc_codegen_llvm/context.rs b/src/librustc_codegen_llvm/context.rs
index d954eb838cb..564e424cf6c 100644
--- a/src/librustc_codegen_llvm/context.rs
+++ b/src/librustc_codegen_llvm/context.rs
@@ -314,6 +314,10 @@ impl<'ll, 'tcx> CodegenCx<'ll, 'tcx> {
             local_gen_sym_counter: Cell::new(0),
         }
     }
+
+    crate fn statics_to_rauw(&self) -> &RefCell<Vec<(&'ll Value, &'ll Value)>> {
+        &self.statics_to_rauw
+    }
 }
 
 impl MiscMethods<'tcx> for CodegenCx<'ll, 'tcx> {
@@ -328,7 +332,7 @@ impl MiscMethods<'tcx> for CodegenCx<'ll, 'tcx> {
     }
 
     fn get_fn(&self, instance: Instance<'tcx>) -> &'ll Value {
-        get_fn(&&self,instance)
+        get_fn(self, instance)
     }
 
     fn get_param(&self, llfn: &'ll Value, index: c_uint) -> &'ll Value {
@@ -431,10 +435,6 @@ impl MiscMethods<'tcx> for CodegenCx<'ll, 'tcx> {
         &self.codegen_unit
     }
 
-    fn statics_to_rauw(&self) -> &RefCell<Vec<(&'ll Value, &'ll Value)>> {
-        &self.statics_to_rauw
-    }
-
     fn used_statics(&self) -> &RefCell<Vec<&'ll Value>> {
         &self.used_statics
     }
@@ -470,8 +470,8 @@ impl MiscMethods<'tcx> for CodegenCx<'ll, 'tcx> {
     }
 }
 
-impl IntrinsicDeclarationMethods<'tcx> for CodegenCx<'b, 'tcx> {
-    fn get_intrinsic(&self, key: &str) -> &'b Value {
+impl CodegenCx<'b, 'tcx> {
+    crate fn get_intrinsic(&self, key: &str) -> &'b Value {
         if let Some(v) = self.intrinsics.borrow().get(key).cloned() {
             return v;
         }