Remove test_utils.

These test utilities have been subsumed by ir::Builder.
This commit is contained in:
Jakob Stoklund Olesen
2016-10-14 15:17:34 -07:00
parent af8f8d98e6
commit 8480879f3e
3 changed files with 0 additions and 43 deletions

View File

@@ -23,6 +23,3 @@ mod write;
mod constant_hash; mod constant_hash;
mod predicates; mod predicates;
mod legalizer; mod legalizer;
#[cfg(test)]
pub mod test_utils;

View File

@@ -1,37 +0,0 @@
//! Helper functions for generating dummy instructions.
use ir::{Function, Ebb, Inst, Opcode};
use ir::entities::NO_VALUE;
use ir::instructions::{InstructionData, ReturnData, VariableArgs, JumpData, BranchData};
use ir::types;
pub fn jump(func: &mut Function, dest: Ebb) -> Inst {
func.dfg.make_inst(InstructionData::Jump {
opcode: Opcode::Jump,
ty: types::VOID,
data: Box::new(JumpData {
destination: dest,
varargs: VariableArgs::new(),
}),
})
}
pub fn branch(func: &mut Function, dest: Ebb) -> Inst {
func.dfg.make_inst(InstructionData::Branch {
opcode: Opcode::Brz,
ty: types::VOID,
data: Box::new(BranchData {
arg: NO_VALUE,
destination: dest,
varargs: VariableArgs::new(),
}),
})
}
pub fn ret(func: &mut Function) -> Inst {
func.dfg.make_inst(InstructionData::Return {
opcode: Opcode::Return,
ty: types::VOID,
data: Box::new(ReturnData { varargs: VariableArgs::new() }),
})
}

View File

@@ -1,3 +0,0 @@
//! Test utility functions.
pub mod make_inst;