From 8480879f3ef3228e102575f33d88c857a2441119 Mon Sep 17 00:00:00 2001 From: Jakob Stoklund Olesen Date: Fri, 14 Oct 2016 15:17:34 -0700 Subject: [PATCH] Remove test_utils. These test utilities have been subsumed by ir::Builder. --- src/libcretonne/lib.rs | 3 -- src/libcretonne/test_utils/make_inst.rs | 37 ------------------------- src/libcretonne/test_utils/mod.rs | 3 -- 3 files changed, 43 deletions(-) delete mode 100644 src/libcretonne/test_utils/make_inst.rs delete mode 100644 src/libcretonne/test_utils/mod.rs diff --git a/src/libcretonne/lib.rs b/src/libcretonne/lib.rs index 26a87bd223..ae25157248 100644 --- a/src/libcretonne/lib.rs +++ b/src/libcretonne/lib.rs @@ -23,6 +23,3 @@ mod write; mod constant_hash; mod predicates; mod legalizer; - -#[cfg(test)] -pub mod test_utils; diff --git a/src/libcretonne/test_utils/make_inst.rs b/src/libcretonne/test_utils/make_inst.rs deleted file mode 100644 index 9ab4429b76..0000000000 --- a/src/libcretonne/test_utils/make_inst.rs +++ /dev/null @@ -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() }), - }) -} diff --git a/src/libcretonne/test_utils/mod.rs b/src/libcretonne/test_utils/mod.rs deleted file mode 100644 index 6273573d6d..0000000000 --- a/src/libcretonne/test_utils/mod.rs +++ /dev/null @@ -1,3 +0,0 @@ -//! Test utility functions. - -pub mod make_inst;