diff options
| author | Kazu Hirata <kazu@google.com> | 2025-10-20 12:35:41 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-10-20 12:35:41 -0700 |
| commit | 628404105b170a19273d74a5e7d9c6e3470fe58b (patch) | |
| tree | cbf265b72650bef4855d8382987e9f81d5c54fcd /clang/lib/Frontend/CompilerInvocation.cpp | |
| parent | 7e1f79c9935fe86b072119fdbb01ee25a80060e6 (diff) | |
| download | llvm-628404105b170a19273d74a5e7d9c6e3470fe58b.zip llvm-628404105b170a19273d74a5e7d9c6e3470fe58b.tar.gz llvm-628404105b170a19273d74a5e7d9c6e3470fe58b.tar.bz2 | |
[ADT] Add llvm::countr_zero_constexpr (#164188)
This patch implements llvm::countr_zero_constexpr, a constexpr version
of llvm::countr_zero, in terms of llvm::popcount while making
llvm::popcount a constexpr function at the same time.
The new function is intended to serve as a marker. When we switch to
C++20, we will most likely go through functions in llvm/ADT/bit.h and
replace them with their counterparts from <bit>. With
llvm::countr_zero_constexpr, we can easily replace its use with
std::countr_zero.
This patch reimplements ConstantLog2 in terms of the new function.
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions
