Adds the ability for callers to detect when saturation occurred on the result of saturating addition/multiplication.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
Looks good with minor fix (suggested in comments).
include/llvm/Support/MathExtras.h | ||
---|---|---|
687 | I think it is better to initialize ResultOverlowed to false and only update when overflow happens. |
I think it is better to initialize ResultOverlowed to false and only update when overflow happens.