codegen and write_metadata can mutate ModuleLLvm.
This commit is contained in:
parent
36f18f2d3a
commit
e5d1fa58f2
@ -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[..] {
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user