diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/VMCore/Type.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/VMCore/Type.cpp b/lib/VMCore/Type.cpp index 00e97520b7..b41d1a0414 100644 --- a/lib/VMCore/Type.cpp +++ b/lib/VMCore/Type.cpp @@ -975,6 +975,11 @@ const IntegerType *IntegerType::get(unsigned NumBits) { return ITy; } +bool IntegerType::isPowerOf2ByteWidth() const { + unsigned BitWidth = getBitWidth(); + return (BitWidth > 7 && Log2_32(BitWidth) == Log2_32_Ceil(BitWidth)); +} + // FunctionValType - Define a class to hold the key that goes into the TypeMap // namespace llvm { |