llvm::maskLeadingOnes

Create a bitmask with the N left-most bits set to 1, and all other bits set to 0. Only unsigned types are allowed.

Synopsis

Declared in <llvm/Support/MathExtras.h>

template<typename T>
constexpr
T
maskLeadingOnes(unsigned int N);

Return Value

A bitmask with the N left-most bits set.

Parameters

NameDescription
NNumber of leading one-bits in the mask.