Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GetCacheSizesMacOSX(): use consistent types. (google#667)
I have absolutely no way to test this, but this looks obviously-good. This was reported by Tim Northover @TNorthover in http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20180903/584223.html > I think this breaks some 32-bit configurations (well, mine at least). > I was using Clang (from Xcode 10 beta) on macOS and got a bunch of > errors referencing sysinfo.cc:292 and onwards: > /Users/tim/llvm/llvm-project/llvm/utils/benchmark/src/sysinfo.cc:292:47: > error: non-constant-expression cannot be narrowed from type > 'std::__1::array<unsigned long long, 4>::value_type' (aka 'unsigned > long long') to 'size_t' (aka 'unsigned long') in initializer list > [-Wc++11-narrowing] > } Cases[] = {{"hw.l1dcachesize", "Data", 1, CacheCounts[1]}, > ^~~~~~~~~~~~~~ > > The same happens when self-hosting ToT. Unfortunately I couldn't > reproduce the issue on Debian (Clang 6.0.1) even with libc++; I'm not > sure what the difference is.
- Loading branch information