[PATCH] D142274: [ADT] Add llvm::byteswap to bit.h

Kazu Hirata via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 20 22:47:59 PST 2023


kazu created this revision.
Herald added a project: All.
kazu requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

This patch adds C++23-style byteswap to bit.h.

The implementation and tests are largely taken from
llvm/include/llvm/Support/MathExtras.h and
llvm/unittests/Support/SwapByteOrderTest.cpp, respectively.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D142274

Files:
  llvm/include/llvm/ADT/bit.h
  llvm/unittests/ADT/BitTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D142274.491036.patch
Type: text/x-patch
Size: 5743 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230121/444e69ca/attachment.bin>


More information about the llvm-commits mailing list