[PATCH] D109217: [llvm-dwarfdump] Fix unsigned overflow when calculating stats

Thorsten via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 7 09:58:26 PDT 2021


tschuett added a comment.

Let me revisit the saturating integer without asserts. If you print 5 for an `uint32_t`, you will never know whether it overflowed never or 10 times (in release mode).

A saturating integer will print 5 or max int (saturated).


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D109217/new/

https://reviews.llvm.org/D109217



More information about the llvm-commits mailing list