[PATCH] D153356: [Align] Add isAligned taking an APInt
Guillaume Chatelet via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 22 04:39:42 PDT 2023
gchatelet added a comment.
In D153356#4435661 <https://reviews.llvm.org/D153356#4435661>, @jdoerfert wrote:
> Make it a template in the header ;)
>
> template<typename APIntTy>
> bool isAligned(Align LHS, const APIntTy &SizeInBytes) {
> ...
> }
Yep courbet@ made the same suggestion to me but then it conflicts with various types that have implicit conversion to `uin64_t` most notably `TypeSize`.
It could work with some `enable_it_t` incantation but I'm not sure it bears its own weight.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D153356/new/
https://reviews.llvm.org/D153356
More information about the llvm-commits
mailing list