diff options
Diffstat (limited to 'include/llvm/CodeGen/MachineConstantPool.h')
-rw-r--r-- | include/llvm/CodeGen/MachineConstantPool.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/llvm/CodeGen/MachineConstantPool.h b/include/llvm/CodeGen/MachineConstantPool.h index d5bd25c47b..99996cf28f 100644 --- a/include/llvm/CodeGen/MachineConstantPool.h +++ b/include/llvm/CodeGen/MachineConstantPool.h @@ -17,6 +17,7 @@ #define LLVM_CODEGEN_MACHINECONSTANTPOOL_H #include <cassert> +#include <climits> #include <vector> namespace llvm { @@ -81,7 +82,7 @@ public: MachineConstantPoolEntry(MachineConstantPoolValue *V, unsigned A) : Alignment(A) { Val.MachineCPVal = V; - Alignment |= 1 << (sizeof(unsigned)*8-1); + Alignment |= 1 << (sizeof(unsigned)*CHAR_BIT-1); } bool isMachineConstantPoolEntry() const { @@ -89,7 +90,7 @@ public: } int getAlignment() const { - return Alignment & ~(1 << (sizeof(unsigned)*8-1)); + return Alignment & ~(1 << (sizeof(unsigned)*CHAR_BIT-1)); } const Type *getType() const; |