Someone ran into an issue with a size_t interface on Darwin.
see (https://reviews.llvm.org/D146492).
Given the use case for HashHistograms, a 32bit unsigned integer should
be sufficient to represent all computed values without overflow.
Paths
| Differential D146544
[llvm-readobj][NFC] Replace size_t in HashHistogram with uint32_t AbandonedPublic Authored by paulkirth on Mar 21 2023, 10:06 AM.
Details
Summary Someone ran into an issue with a size_t interface on Darwin. Given the use case for HashHistograms, a 32bit unsigned integer should
Diff Detail
Event Timeline
Revision Contents
Diff 507031 llvm/tools/llvm-readobj/ELFDumper.cpp
|
I guess if the type of I is changed from size_t to uint32_t, static_cast<uint64_t> is no longer needed here and on Count[I] because virtual void printNumber(StringRef Label, uint32_t Value) is exist. How do you think?