aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/RISCV/Disassembler/RISCVDisassembler.cpp
diff options
context:
space:
mode:
authorPeng Liu <winner245@hotmail.com>2025-03-19 11:36:29 -0400
committerGitHub <noreply@github.com>2025-03-19 11:36:29 -0400
commite53bea51829ee9876a2010fec1a13d740533b89a (patch)
treea6dd8c71037b43632f7c7fb473d8178bff4b83bf /llvm/lib/Target/RISCV/Disassembler/RISCVDisassembler.cpp
parentd7879e524fbbc4c2790dac62343444191f736f00 (diff)
downloadllvm-e53bea51829ee9876a2010fec1a13d740533b89a.zip
llvm-e53bea51829ee9876a2010fec1a13d740533b89a.tar.gz
llvm-e53bea51829ee9876a2010fec1a13d740533b89a.tar.bz2
[libc++] Fix ambiguous call in {ranges, std}::count (#122529)
This PR fixes an ambiguous call encountered while using the `std::ranges::count` and `std::count` algorithms with `vector<bool>` with small `size_type`s. The ambiguity arises from integral promotions during the internal bitwise arithmetic of the `count` algorithms for small integral types. This results in multiple viable candidates: `__libcpp_popcount(unsigned)`,` __libcpp_popcount(unsigned long)`, and `__libcpp_popcount(unsigned long long)`, leading to an ambiguous call error. To resolve this ambiguity, we introduce a dispatcher function, `__popcount`, which directs calls to the appropriate overloads of `__libcpp_popcount`. This closes #122528.
Diffstat (limited to 'llvm/lib/Target/RISCV/Disassembler/RISCVDisassembler.cpp')
0 files changed, 0 insertions, 0 deletions