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.
Details
Details
Diff Detail
Diff Detail
Paths
| Differential D15219
[Support] Change SaturatingAdd()/SaturatingMultiply() to use pointer for returning overflow state ClosedPublic Authored by slingn on Dec 3 2015, 4:48 PM.
Details Summary Improve SaturatingAdd()/SaturatingMultiply() to use bool * to optionally return overflow result.
Diff Detail Event TimelineThis revision is now accepted and ready to land.Dec 3 2015, 4:56 PM Closed by commit rL255128: [Support] Change SaturatingAdd()/SaturatingMultiply() to use pointer for… (authored by slingn). · Explain WhyDec 9 2015, 9:14 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 41831 include/llvm/ProfileData/InstrProf.h
include/llvm/Support/MathExtras.h
lib/ProfileData/InstrProfWriter.cpp
unittests/Support/MathExtrasTest.cpp
|