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

Evan Cheng evan.cheng at apple.com
Tue May 21 17:36:21 PDT 2013


Can this consolidate with MathExtras.h?

Evan

On May 21, 2013, at 5:28 PM, Michael Spencer <bigcheesegs at gmail.com> wrote:

> 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
> <D841.1.patch>_______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list