Remove CodeSink

This commit is contained in:
bjorn3
2022-01-11 17:10:37 +01:00
parent a48a60f958
commit 55d722db05
8 changed files with 23 additions and 103 deletions

View File

@@ -4,7 +4,7 @@
use crate::subtest::{run_filecheck, Context, SubTest};
use anyhow::{bail, Result};
use cranelift_codegen::binemit::{self, CodeInfo};
use cranelift_codegen::binemit::CodeInfo;
use cranelift_codegen::ir;
use cranelift_reader::{TestCommand, TestOption};
use log::info;
@@ -75,17 +75,6 @@ impl SubTest for TestCompile {
}
}
/// Code sink that simply counts bytes.
struct SizeSink {
offset: binemit::CodeOffset,
}
impl binemit::CodeSink for SizeSink {
fn put1(&mut self, _: u8) {
self.offset += 1;
}
}
fn check_precise_output(text: &str, context: &Context) -> Result<()> {
let actual = text.lines().collect::<Vec<_>>();