[Support] Add optional argument to SaturatingAdd() and SaturatingMultiply() to indica...
authorNathan Slingerland <slingn@gmail.com>
Mon, 23 Nov 2015 21:54:22 +0000 (21:54 +0000)
committerNathan Slingerland <slingn@gmail.com>
Mon, 23 Nov 2015 21:54:22 +0000 (21:54 +0000)
commit0197bd6d5ecc07c89e7302c67212c4fcdbc3f48c
treee767888a4e9e1e20105aec605099e492621a4b75
parent96ddcceb80cd68f74b9cda89f043b7c08784a26b
[Support] Add optional argument to SaturatingAdd() and SaturatingMultiply() to indicate that overflow occurred

Summary: Adds the ability for callers to detect when saturation occurred on the result of saturating addition/multiplication.

Reviewers: davidxl, silvas, rsmith

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D14931

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253921 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Support/MathExtras.h
unittests/Support/MathExtrasTest.cpp