about summary refs log tree commit diff
path: root/src/librustc_codegen_llvm
diff options
context:
space:
mode:
authorGabriela Alexandra Moldovan <gabi_250@live.com>2019-02-21 13:38:44 +0000
committerGabriela Alexandra Moldovan <gabi_250@live.com>2019-02-21 13:38:44 +0000
commite5d1fa58f2dd5e86dd91f370313a4be85a39917a (patch)
tree4d2a58a04a21aeeda04bb15a6e7c6cc6bfd2df86 /src/librustc_codegen_llvm
parent36f18f2d3a2df4a2ce0925f438631b615e2ab4dc (diff)
downloadrust-e5d1fa58f2dd5e86dd91f370313a4be85a39917a.tar.gz
rust-e5d1fa58f2dd5e86dd91f370313a4be85a39917a.zip
codegen and write_metadata can mutate ModuleLLvm.
Diffstat (limited to 'src/librustc_codegen_llvm')
-rw-r--r--src/librustc_codegen_llvm/allocator.rs2
-rw-r--r--src/librustc_codegen_llvm/base.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/librustc_codegen_llvm/allocator.rs b/src/librustc_codegen_llvm/allocator.rs
index 7430cd3f709..9787b07ef8c 100644
--- a/src/librustc_codegen_llvm/allocator.rs
+++ b/src/librustc_codegen_llvm/allocator.rs
@@ -9,7 +9,7 @@ use rustc_allocator::{ALLOCATOR_METHODS, AllocatorTy};
 use crate::ModuleLlvm;
 use crate::llvm::{self, False, True};
 
-pub(crate) unsafe fn codegen(tcx: TyCtxt, mods: &ModuleLlvm, kind: AllocatorKind) {
+pub(crate) unsafe fn codegen(tcx: TyCtxt, mods: &mut ModuleLlvm, kind: AllocatorKind) {
     let llcx = &*mods.llcx;
     let llmod = mods.llmod();
     let usize = match &tcx.sess.target.target.target_pointer_width[..] {
diff --git a/src/librustc_codegen_llvm/base.rs b/src/librustc_codegen_llvm/base.rs
index 33531bb6948..7b2e8ec3df6 100644
--- a/src/librustc_codegen_llvm/base.rs
+++ b/src/librustc_codegen_llvm/base.rs
@@ -46,7 +46,7 @@ use crate::value::Value;
 
 pub fn write_metadata<'a, 'gcx>(
     tcx: TyCtxt<'a, 'gcx, 'gcx>,
-    llvm_module: &ModuleLlvm
+    llvm_module: &mut ModuleLlvm
 ) -> EncodedMetadata {
     use std::io::Write;
     use flate2::Compression;