diff options
| author | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2024-12-13 09:39:26 +0000 | 
|---|---|---|
| committer | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2025-05-28 20:55:00 +0000 | 
| commit | c593c0170347c016e54ab754d8dcdc283f4f4dfb (patch) | |
| tree | 097bc660e68822bfd149426fc77a17004011d3a0 /compiler/rustc_codegen_gcc/src | |
| parent | 6f69710780d579b180ab38da4c1384d630f7bd31 (diff) | |
| download | rust-c593c0170347c016e54ab754d8dcdc283f4f4dfb.tar.gz rust-c593c0170347c016e54ab754d8dcdc283f4f4dfb.zip | |
Remove codegen_unit from MiscCodegenMethods
Diffstat (limited to 'compiler/rustc_codegen_gcc/src')
| -rw-r--r-- | compiler/rustc_codegen_gcc/src/base.rs | 11 | ||||
| -rw-r--r-- | compiler/rustc_codegen_gcc/src/context.rs | 4 | 
2 files changed, 8 insertions, 7 deletions
| diff --git a/compiler/rustc_codegen_gcc/src/base.rs b/compiler/rustc_codegen_gcc/src/base.rs index a9d7808c833..c3ba975d964 100644 --- a/compiler/rustc_codegen_gcc/src/base.rs +++ b/compiler/rustc_codegen_gcc/src/base.rs @@ -219,17 +219,22 @@ pub fn compile_codegen_unit( let mono_items = cgu.items_in_deterministic_order(tcx); for &(mono_item, data) in &mono_items { - mono_item.predefine::<Builder<'_, '_, '_>>(&cx, data.linkage, data.visibility); + mono_item.predefine::<Builder<'_, '_, '_>>( + &cx, + cgu_name.as_str(), + data.linkage, + data.visibility, + ); } // ... and now that we have everything pre-defined, fill out those definitions. for &(mono_item, item_data) in &mono_items { - mono_item.define::<Builder<'_, '_, '_>>(&mut cx, item_data); + mono_item.define::<Builder<'_, '_, '_>>(&mut cx, cgu_name.as_str(), item_data); } // If this codegen unit contains the main function, also create the // wrapper here - maybe_create_entry_wrapper::<Builder<'_, '_, '_>>(&cx); + maybe_create_entry_wrapper::<Builder<'_, '_, '_>>(&cx, cx.codegen_unit); // Finalize debuginfo if cx.sess().opts.debuginfo != DebugInfo::None { diff --git a/compiler/rustc_codegen_gcc/src/context.rs b/compiler/rustc_codegen_gcc/src/context.rs index 73718994e64..c6c43201f21 100644 --- a/compiler/rustc_codegen_gcc/src/context.rs +++ b/compiler/rustc_codegen_gcc/src/context.rs @@ -470,10 +470,6 @@ impl<'gcc, 'tcx> MiscCodegenMethods<'tcx> for CodegenCx<'gcc, 'tcx> { self.tcx.sess } - fn codegen_unit(&self) -> &'tcx CodegenUnit<'tcx> { - self.codegen_unit - } - fn set_frame_pointer_type(&self, _llfn: RValue<'gcc>) { // TODO(antoyo) } | 
