()
| 717 | |
| 718 | #[test] |
| 719 | fn cold_blocks() { |
| 720 | let mut func = Function::new(); |
| 721 | { |
| 722 | let mut pos = FuncCursor::new(&mut func); |
| 723 | |
| 724 | let block0 = pos.func.dfg.make_block(); |
| 725 | pos.insert_block(block0); |
| 726 | pos.func.layout.set_cold(block0); |
| 727 | |
| 728 | let block1 = pos.func.dfg.make_block(); |
| 729 | pos.insert_block(block1); |
| 730 | pos.func.dfg.append_block_param(block1, types::I32); |
| 731 | pos.func.layout.set_cold(block1); |
| 732 | } |
| 733 | |
| 734 | assert_eq!( |
| 735 | func.to_string(), |
| 736 | "function u0:0() fast {\nblock0 cold:\n\nblock1(v0: i32) cold:\n}\n" |
| 737 | ); |
| 738 | } |
| 739 | } |
nothing calls this directly
no test coverage detected