1
Fork 0

refactor check_{lang,library}_ub: use a single intrinsic, put policy into library

This commit is contained in:
Ralf Jung 2024-03-17 10:29:02 +01:00
parent 987ef4c922
commit 6177530420
34 changed files with 133 additions and 118 deletions

View file

@ -639,7 +639,7 @@ impl<'mir, 'tcx> ConstPropagator<'mir, 'tcx> {
NullOp::OffsetOf(fields) => {
op_layout.offset_of_subfield(self, fields.iter()).bytes()
}
NullOp::UbCheck(_) => return None,
NullOp::UbChecks => return None,
};
ImmTy::from_scalar(Scalar::from_target_usize(val, self), layout).into()
}