Skip to content

Commit 25df5d0

Browse files
committed
Pass &mut self to codegen_global_asm
1 parent 8582bc4 commit 25df5d0

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/asm.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -794,7 +794,7 @@ fn dummy_output_type<'gcc, 'tcx>(cx: &CodegenCx<'gcc, 'tcx>, reg: InlineAsmRegCl
794794

795795
impl<'gcc, 'tcx> AsmCodegenMethods<'tcx> for CodegenCx<'gcc, 'tcx> {
796796
fn codegen_global_asm(
797-
&self,
797+
&mut self,
798798
template: &[InlineAsmTemplatePiece],
799799
operands: &[GlobalAsmOperandRef<'tcx>],
800800
options: InlineAsmOptions,

src/base.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ pub fn compile_codegen_unit(
206206
let f128_type_supported = target_info.supports_target_dependent_type(CType::Float128);
207207
let u128_type_supported = target_info.supports_target_dependent_type(CType::UInt128t);
208208
// TODO: improve this to avoid passing that many arguments.
209-
let cx = CodegenCx::new(
209+
let mut cx = CodegenCx::new(
210210
&context,
211211
cgu,
212212
tcx,
@@ -224,7 +224,7 @@ pub fn compile_codegen_unit(
224224

225225
// ... and now that we have everything pre-defined, fill out those definitions.
226226
for &(mono_item, item_data) in &mono_items {
227-
mono_item.define::<Builder<'_, '_, '_>>(&cx, item_data);
227+
mono_item.define::<Builder<'_, '_, '_>>(&mut cx, item_data);
228228
}
229229

230230
// If this codegen unit contains the main function, also create the

src/builder.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ enum ExtremumOperation {
4545
Min,
4646
}
4747

48-
pub struct Builder<'a: 'gcc, 'gcc, 'tcx> {
48+
pub struct Builder<'a, 'gcc, 'tcx> {
4949
pub cx: &'a CodegenCx<'gcc, 'tcx>,
5050
pub block: Block<'gcc>,
5151
pub location: Option<Location<'gcc>>,

0 commit comments

Comments
 (0)