[PATCH] D15219: [Support] Change SaturatingAdd()/SaturatingMultiply() to use pointer for returning overflow state

Nathan Slingerland via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 3 16:48:29 PST 2015


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

Improve SaturatingAdd()/SaturatingMultiply() to use bool * to optionally return overflow result.
This should make it clearer that the value is returned at callsites and reduces the size of the implementation.

http://reviews.llvm.org/D15219

Files:
  include/llvm/ProfileData/InstrProf.h
  include/llvm/Support/MathExtras.h
  lib/ProfileData/InstrProfWriter.cpp
  unittests/Support/MathExtrasTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D15219.41831.patch
Type: text/x-patch
Size: 8607 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151204/99b741f6/attachment.bin>


More information about the llvm-commits mailing list