Remove sourcelocs if the function still crashes after they are removed, to make the reduced clif IR easier to read.
(context: &mut CrashCheckContext, func: &mut Function)
| 797 | |
| 798 | /// Remove sourcelocs if the function still crashes after they are removed, to make the reduced clif IR easier to read. |
| 799 | fn try_remove_srclocs(context: &mut CrashCheckContext, func: &mut Function) { |
| 800 | let mut func_with_removed_sourcelocs = func.clone(); |
| 801 | func_with_removed_sourcelocs.srclocs.clear(); |
| 802 | if let CheckResult::Crash(_) = context.check_for_crash(&func_with_removed_sourcelocs) { |
| 803 | *func = func_with_removed_sourcelocs; |
| 804 | } |
| 805 | } |
| 806 | |
| 807 | fn reduce(isa: &dyn TargetIsa, mut func: Function, verbose: bool) -> Result<(Function, String)> { |
| 808 | let mut context = CrashCheckContext::new(isa); |
no test coverage detected