[libc-commits] [PATCH] D100571: [libc] Add endianness support

Siva Chandra via Phabricator via libc-commits libc-commits at lists.llvm.org
Fri Apr 16 13:53:31 PDT 2021


sivachandra accepted this revision.
sivachandra added a comment.
This revision is now accepted and ready to land.

In D100571#2694526 <https://reviews.llvm.org/D100571#2694526>, @gchatelet wrote:

> Thx for the suggestion, I didn't go with explicit member function as it would allow for integer promotion.
> In the case of endianness we want to make sure we only accept one of `uint8_t`, `uint16_t`, `uint32_t`, `uint64_t` and no other type.
> I've added the symmetric functions as you suggested.

I think we can try to be cute and make it a compile-time error to use a non-uint*_t type, but not sure if it is worth it.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D100571/new/

https://reviews.llvm.org/D100571



More information about the libc-commits mailing list