about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbjorn3 <bjorn3@users.noreply.github.com>2021-08-20 21:38:50 +0200
committerbjorn3 <bjorn3@users.noreply.github.com>2021-08-20 21:38:50 +0200
commit14617516f8e3346ef5b6251c5ec9360cf81b7bbb (patch)
tree638120b3e7bf88a1e56004df184accc955e36a9e
parentd8308ece3656c2174faf4891d96e7be868a28eb7 (diff)
downloadrust-14617516f8e3346ef5b6251c5ec9360cf81b7bbb.tar.gz
rust-14617516f8e3346ef5b6251c5ec9360cf81b7bbb.zip
Make {Debug,Unwind}Context::emit non-generic
-rw-r--r--src/debuginfo/emit.rs3
-rw-r--r--src/debuginfo/unwind.rs3
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<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);
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<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();