about summary refs log tree commit diff
path: root/src/librustc_codegen_llvm/allocator.rs
diff options
context:
space:
mode:
authorIrina Popa <irinagpopa@gmail.com>2018-06-27 17:57:25 +0300
committerIrina Popa <irinagpopa@gmail.com>2018-07-30 18:27:52 +0300
commit249d5acaec0b10ee15b21b888977b5445baba42e (patch)
tree966ea8d75c9e97d2b6e70d0bcd30ceef689d4b8a /src/librustc_codegen_llvm/allocator.rs
parentaf04e9426c71ac1050b9007c93b03864e45a81df (diff)
downloadrust-249d5acaec0b10ee15b21b888977b5445baba42e.tar.gz
rust-249d5acaec0b10ee15b21b888977b5445baba42e.zip
rustc_codegen_llvm: use safe references for Context and Module.
Diffstat (limited to 'src/librustc_codegen_llvm/allocator.rs')
-rw-r--r--src/librustc_codegen_llvm/allocator.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/librustc_codegen_llvm/allocator.rs b/src/librustc_codegen_llvm/allocator.rs
index 49cdbf34fa9..2d401da958b 100644
--- a/src/librustc_codegen_llvm/allocator.rs
+++ b/src/librustc_codegen_llvm/allocator.rs
@@ -20,8 +20,8 @@ use ModuleLlvm;
 use llvm::{self, False, True};
 
 pub(crate) unsafe fn codegen(tcx: TyCtxt, mods: &ModuleLlvm, kind: AllocatorKind) {
-    let llcx = mods.llcx;
-    let llmod = mods.llmod;
+    let llcx = &*mods.llcx;
+    let llmod = mods.llmod();
     let usize = match &tcx.sess.target.target.target_pointer_width[..] {
         "16" => llvm::LLVMInt16TypeInContext(llcx),
         "32" => llvm::LLVMInt32TypeInContext(llcx),