Merge commit '61667dedf5' into sync_cg_clif-2021-09-19

This commit is contained in:
bjorn3 2021-09-19 13:56:58 +02:00
commit 86f9bcfb8e
24 changed files with 332 additions and 294 deletions

View file

@ -4,10 +4,11 @@ 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;
use crate::backend::WriteDebugInfo;
use super::object::WriteDebugInfo;
pub(crate) struct UnwindContext {
endian: RunTimeEndian,
@ -55,7 +56,7 @@ impl UnwindContext {
}
}
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();