Make functions cloneable for testing.
It's not super fast to clone a function, but it is faster than re-parsing the test case file it came from. Some tests want to mutate the function, and there may be other tests in the same script that need the original function.
This commit is contained in:
@@ -20,6 +20,7 @@ use ir::entities::{Ebb, NO_EBB, Inst, NO_INST};
|
||||
/// While data dependencies are not recorded, instruction ordering does affect control
|
||||
/// dependencies, so part of the semantics of the program are determined by the layout.
|
||||
///
|
||||
#[derive(Clone)]
|
||||
pub struct Layout {
|
||||
// Linked list nodes for the layout order of EBBs Forms a doubly linked list, terminated in
|
||||
// both ends by NO_EBB.
|
||||
|
||||
Reference in New Issue
Block a user