diff options
author | Kazu Hirata <kazu@google.com> | 2025-10-03 23:46:51 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-10-03 23:46:51 -0700 |
commit | 30f7c5d04c395e766bd778acfa46ee88e2ad300d (patch) | |
tree | ad5332e31653285792971d32fae18149dda3a2ec /lldb/scripts/Python/python-extensions.swig | |
parent | cd32b9b6c3b2fda3a781d9ce0a0cf8e21c9d0137 (diff) | |
download | llvm-30f7c5d04c395e766bd778acfa46ee88e2ad300d.zip llvm-30f7c5d04c395e766bd778acfa46ee88e2ad300d.tar.gz llvm-30f7c5d04c395e766bd778acfa46ee88e2ad300d.tar.bz2 |
[ADT] Add bit_width_constexpr (#161775)
This patch adds llvm::bit_width_constexpr, a constexpr version of
llvm::bit_width.
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::bit_width_constexpr, we can easily replace its use with
std::bit_width.
This patch refactors a couple of places. Specifically:
- bitWidth in BitmaskEnum.h is replaced with the new function.
- bitsRequired in PointerUnion.h is redefined in terms of the new
function.
I've used Compiler Explorer to check the equivalence:
https://godbolt.org/z/1oKMK9Ez7
Diffstat (limited to 'lldb/scripts/Python/python-extensions.swig')
0 files changed, 0 insertions, 0 deletions