(result: &full_stack::compilation_pipeline::CompilationResult, name: &str)
| 16 | .ir_program |
| 17 | .functions |
| 18 | .iter() |
| 19 | .flat_map(|f| f.blocks.iter()) |
| 20 | .flat_map(|b| b.instructions.iter()) |
| 21 | .filter(|i| matches!(i, IrInstruction::Call { function, .. } if function == name)) |
| 22 | .count() |
| 23 | } |
| 24 | |
| 25 | // -- Small-struct ABI (function return) --------------------------------------- |
| 26 | |
| 27 | /// The callee must be invoked exactly once. Address mode and the spill |
| 28 | /// fallback once each evaluated the rvalue, emitting two calls. |
| 29 | #[test] |
| 30 | fn function_return_struct_called_exactly_once() { |
nothing calls this directly
no outgoing calls
no test coverage detected