diff options
| author | bjorn3 <bjorn3@users.noreply.github.com> | 2022-04-30 21:20:08 +0200 |
|---|---|---|
| committer | bjorn3 <bjorn3@users.noreply.github.com> | 2022-04-30 21:20:08 +0200 |
| commit | 78c65a52db0016f489862ecea92a09ad66a2b960 (patch) | |
| tree | b5e4db99724f287f91fdfa5ab9fe7939fe6af7ce /compiler/rustc_codegen_gcc/src | |
| parent | fab72301d9089761766b389df209986c2bc38e5d (diff) | |
| download | rust-78c65a52db0016f489862ecea92a09ad66a2b960.tar.gz rust-78c65a52db0016f489862ecea92a09ad66a2b960.zip | |
Merge new_metadata into codegen_allocator
Diffstat (limited to 'compiler/rustc_codegen_gcc/src')
| -rw-r--r-- | compiler/rustc_codegen_gcc/src/lib.rs | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/compiler/rustc_codegen_gcc/src/lib.rs b/compiler/rustc_codegen_gcc/src/lib.rs index 684b845c38a..58996a9db78 100644 --- a/compiler/rustc_codegen_gcc/src/lib.rs +++ b/compiler/rustc_codegen_gcc/src/lib.rs @@ -139,14 +139,12 @@ impl CodegenBackend for GccCodegenBackend { } impl ExtraBackendMethods for GccCodegenBackend { - fn new_metadata<'tcx>(&self, _tcx: TyCtxt<'tcx>, _mod_name: &str) -> Self::Module { - GccContext { + fn codegen_allocator<'tcx>(&self, tcx: TyCtxt<'tcx>, module_name: &str, kind: AllocatorKind, has_alloc_error_handler: bool) -> Self::Module { + let mut mods = GccContext { context: Context::default(), - } - } - - fn codegen_allocator<'tcx>(&self, tcx: TyCtxt<'tcx>, mods: &mut Self::Module, module_name: &str, kind: AllocatorKind, has_alloc_error_handler: bool) { - unsafe { allocator::codegen(tcx, mods, module_name, kind, has_alloc_error_handler) } + }; + unsafe { allocator::codegen(tcx, &mut mods, module_name, kind, has_alloc_error_handler); } + mods } fn compile_codegen_unit<'tcx>(&self, tcx: TyCtxt<'tcx>, cgu_name: Symbol) -> (ModuleCodegen<Self::Module>, u64) { |
