codegen and write_metadata can mutate ModuleLLvm.

This commit is contained in:
Gabriela Alexandra Moldovan 2019-02-21 13:38:44 +00:00
parent 36f18f2d3a
commit e5d1fa58f2
2 changed files with 2 additions and 2 deletions

View File

@ -9,7 +9,7 @@
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[..] {

View File

@ -46,7 +46,7 @@
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;