(func: &Function, expected_ir: &str)
| 1317 | |
| 1318 | #[track_caller] |
| 1319 | fn check(func: &Function, expected_ir: &str) { |
| 1320 | let expected_ir = expected_ir.trim(); |
| 1321 | let actual_ir = func.display().to_string(); |
| 1322 | let actual_ir = actual_ir.trim(); |
| 1323 | assert!( |
| 1324 | expected_ir == actual_ir, |
| 1325 | "Expected:\n{expected_ir}\nGot:\n{actual_ir}" |
| 1326 | ); |
| 1327 | } |
| 1328 | |
| 1329 | /// Helper function to construct a fixed frontend configuration. |
| 1330 | fn systemv_frontend_config() -> TargetFrontendConfig { |