Skip to content

Commit e5d1fa5

Browse files
committed
codegen and write_metadata can mutate ModuleLLvm.
1 parent 36f18f2 commit e5d1fa5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/librustc_codegen_llvm/allocator.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use rustc_allocator::{ALLOCATOR_METHODS, AllocatorTy};
99
use crate::ModuleLlvm;
1010
use crate::llvm::{self, False, True};
1111

12-
pub(crate) unsafe fn codegen(tcx: TyCtxt, mods: &ModuleLlvm, kind: AllocatorKind) {
12+
pub(crate) unsafe fn codegen(tcx: TyCtxt, mods: &mut ModuleLlvm, kind: AllocatorKind) {
1313
let llcx = &*mods.llcx;
1414
let llmod = mods.llmod();
1515
let usize = match &tcx.sess.target.target.target_pointer_width[..] {

src/librustc_codegen_llvm/base.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ use crate::value::Value;
4646

4747
pub fn write_metadata<'a, 'gcx>(
4848
tcx: TyCtxt<'a, 'gcx, 'gcx>,
49-
llvm_module: &ModuleLlvm
49+
llvm_module: &mut ModuleLlvm
5050
) -> EncodedMetadata {
5151
use std::io::Write;
5252
use flate2::Compression;

0 commit comments

Comments
 (0)