[PATCH] D14931: [Support] Add optional argument to SaturatingAdd() and SaturatingMultiply() to indicate that overflow occurred

Nathan Slingerland via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 23 11:24:18 PST 2015


slingn created this revision.
slingn added reviewers: davidxl, silvas, rsmith.
slingn added a subscriber: llvm-commits.

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

http://reviews.llvm.org/D14931

Files:
  include/llvm/Support/MathExtras.h
  unittests/Support/MathExtrasTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D14931.40955.patch
Type: text/x-patch
Size: 6418 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151123/4b3c852b/attachment.bin>


More information about the llvm-commits mailing list