diff options
| author | Gabriela Alexandra Moldovan <gabi_250@live.com> | 2019-02-21 13:38:44 +0000 |
|---|---|---|
| committer | Gabriela Alexandra Moldovan <gabi_250@live.com> | 2019-02-21 13:38:44 +0000 |
| commit | e5d1fa58f2dd5e86dd91f370313a4be85a39917a (patch) | |
| tree | 4d2a58a04a21aeeda04bb15a6e7c6cc6bfd2df86 /src/librustc_codegen_llvm | |
| parent | 36f18f2d3a2df4a2ce0925f438631b615e2ab4dc (diff) | |
| download | rust-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.rs | 2 | ||||
| -rw-r--r-- | src/librustc_codegen_llvm/base.rs | 2 |
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; |
