[PATCH] [Support] Add BitHacks.h - generic bit utility functions.

Michael Spencer bigcheesegs at gmail.com
Tue May 21 17:28:35 PDT 2013


I need generic bit utility functions for lld, so I wrote these. The main additional functionality is giving a choice of behavior on zero, and being generic instead of having _32 and _64 versions.

The signed version of most of these functions are marked = delete; As the operation doesn't make sense in C++.

I plan to move all users of the versions in MathExtras.h over to this.

http://llvm-reviews.chandlerc.com/D841

Files:
  include/llvm/Support/BitHacks.h
  unittests/Support/BitHacksTest.cpp
  unittests/Support/CMakeLists.txt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D841.1.patch
Type: text/x-patch
Size: 9893 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130521/3cae2cf0/attachment.bin>


More information about the llvm-commits mailing list