[llvm] [ProfileData] Implement contains in SampleProfileNameTable (NFC) (PR #211995)
Martin Storsjö via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 30 00:23:28 PDT 2026
mstorsjo wrote:
This broke building for 32 bit platforms, e.g. https://github.com/mstorsjo/llvm-mingw/actions/runs/30506767557/job/90782825838:
```
In file included from /home/runner/work/llvm-mingw/llvm-mingw/llvm-project/llvm/lib/ProfileData/SampleProfReader.cpp:22:
/home/runner/work/llvm-mingw/llvm-mingw/llvm-project/llvm/include/llvm/ProfileData/SampleProfReader.h:507:23: error: non-constant-expression cannot be narrowed from type 'uint64_t' (aka 'unsigned long long') to 'size_t' (aka 'unsigned int') in initializer list [-Wc++11-narrowing]
507 | Spans{{{Data, NumCS},
| ^~~~~
/home/runner/work/llvm-mingw/llvm-mingw/llvm-project/llvm/include/llvm/ProfileData/SampleProfReader.h:507:23: note: insert an explicit cast to silence this issue
507 | Spans{{{Data, NumCS},
| ^~~~~
| static_cast<size_t>( )
/home/runner/work/llvm-mingw/llvm-mingw/llvm-project/llvm/include/llvm/ProfileData/SampleProfReader.h:508:31: error: non-constant-expression cannot be narrowed from type 'uint64_t' (aka 'unsigned long long') to 'size_t' (aka 'unsigned int') in initializer list [-Wc++11-narrowing]
508 | {Data + NumCS, NumFlat},
| ^~~~~~~
/home/runner/work/llvm-mingw/llvm-mingw/llvm-project/llvm/include/llvm/ProfileData/SampleProfReader.h:508:31: note: insert an explicit cast to silence this issue
508 | {Data + NumCS, NumFlat},
| ^~~~~~~
| static_cast<size_t>( )
/home/runner/work/llvm-mingw/llvm-mingw/llvm-project/llvm/include/llvm/ProfileData/SampleProfReader.h:509:41: error: non-constant-expression cannot be narrowed from type 'uint64_t' (aka 'unsigned long long') to 'size_t' (aka 'unsigned int') in initializer list [-Wc++11-narrowing]
509 | {Data + NumCS + NumFlat, NumInlinees}}} {}
| ^~~~~~~~~~~
/home/runner/work/llvm-mingw/llvm-mingw/llvm-project/llvm/include/llvm/ProfileData/SampleProfReader.h:509:41: note: insert an explicit cast to silence this issue
509 | {Data + NumCS + NumFlat, NumInlinees}}} {}
| ^~~~~~~~~~~
| static_cast<size_t>( )
3 errors generated.
```
https://github.com/llvm/llvm-project/pull/211995
More information about the llvm-commits
mailing list