From 14617516f8e3346ef5b6251c5ec9360cf81b7bbb Mon Sep 17 00:00:00 2001 From: bjorn3 Date: Fri, 20 Aug 2021 21:38:50 +0200 Subject: [PATCH] Make {Debug,Unwind}Context::emit non-generic --- src/debuginfo/emit.rs | 3 ++- src/debuginfo/unwind.rs | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/debuginfo/emit.rs b/src/debuginfo/emit.rs index fb6ccd7c535..bbbc7227900 100644 --- a/src/debuginfo/emit.rs +++ b/src/debuginfo/emit.rs @@ -1,5 +1,6 @@ //! Write the debuginfo into an object file. +use cranelift_object::ObjectProduct; use rustc_data_structures::fx::FxHashMap; use gimli::write::{Address, AttributeValue, EndianVec, Result, Sections, Writer}; @@ -10,7 +11,7 @@ use crate::backend::WriteDebugInfo; use super::DebugContext; impl DebugContext<'_> { - pub(crate) fn emit(&mut self, product: &mut P) { + pub(crate) fn emit(&mut self, product: &mut ObjectProduct) { let unit_range_list_id = self.dwarf.unit.ranges.add(self.unit_range_list.clone()); let root = self.dwarf.unit.root(); let root = self.dwarf.unit.get_mut(root); diff --git a/src/debuginfo/unwind.rs b/src/debuginfo/unwind.rs index d1251e749f3..66ed0f03ee4 100644 --- a/src/debuginfo/unwind.rs +++ b/src/debuginfo/unwind.rs @@ -4,6 +4,7 @@ use crate::prelude::*; use cranelift_codegen::isa::{unwind::UnwindInfo, TargetIsa}; +use cranelift_object::ObjectProduct; use gimli::write::{Address, CieId, EhFrame, FrameTable, Section}; use gimli::RunTimeEndian; @@ -55,7 +56,7 @@ impl UnwindContext { } } - pub(crate) fn emit(self, product: &mut P) { + pub(crate) fn emit(self, product: &mut ObjectProduct) { let mut eh_frame = EhFrame::from(super::emit::WriterRelocate::new(self.endian)); self.frame_table.write_eh_frame(&mut eh_frame).unwrap();