Make {Debug,Unwind}Context::emit non-generic

This commit is contained in:
bjorn3 2021-08-20 21:38:50 +02:00
parent d8308ece36
commit 14617516f8
2 changed files with 4 additions and 2 deletions

View File

@ -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 super::DebugContext;
impl DebugContext<'_> {
pub(crate) fn emit<P: WriteDebugInfo>(&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);

View File

@ -4,6 +4,7 @@
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 @@ pub(crate) fn add_function(&mut self, func_id: FuncId, context: &Context, isa: &
}
}
pub(crate) fn emit<P: WriteDebugInfo>(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();