Update for cranelift change

This commit is contained in:
bjorn3 2018-11-15 10:55:40 +01:00
parent 41ee6781f9
commit 4a69f55758

View File

@ -10,6 +10,26 @@ use crate::prelude::*;
pub struct CommentWriter(pub HashMap<Inst, String>);
impl FuncWriter for CommentWriter {
fn write_preamble(
&mut self,
w: &mut dyn fmt::Write,
func: &Function,
reg_info: Option<&isa::RegInfo>,
) -> Result<bool, fmt::Error> {
PlainWriter.write_preamble(w, func, reg_info)
}
fn write_ebb_header(
&mut self,
w: &mut dyn fmt::Write,
func: &Function,
isa: Option<&dyn isa::TargetIsa>,
ebb: Ebb,
indent: usize,
) -> fmt::Result {
PlainWriter.write_ebb_header(w, func, isa, ebb, indent)
}
fn write_instruction(
&mut self,
w: &mut dyn fmt::Write,
@ -25,15 +45,6 @@ impl FuncWriter for CommentWriter {
}
Ok(())
}
fn write_preamble(
&mut self,
w: &mut dyn fmt::Write,
func: &Function,
reg_info: Option<&isa::RegInfo>,
) -> Result<bool, fmt::Error> {
PlainWriter.write_preamble(w, func, reg_info)
}
}
impl<'a, 'tcx: 'a, B: Backend + 'a> FunctionCx<'a, 'tcx, B> {