Remove test_utils.
These test utilities have been subsumed by ir::Builder.
This commit is contained in:
@@ -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;
|
|
||||||
|
|||||||
@@ -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() }),
|
|
||||||
})
|
|
||||||
}
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
//! Test utility functions.
|
|
||||||
|
|
||||||
pub mod make_inst;
|
|
||||||
Reference in New Issue
Block a user