From de551f91d8816632a76a065084caab9fab6aacff Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Wed, 1 Apr 2009 18:45:54 +0000 Subject: Use CHAR_BIT instead of hard-coding 8 in several places where it is appropriate. This helps visually differentiate host-oriented calculations from target-oriented calculations. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68227 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/CodeGen/MachineConstantPool.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'include/llvm/CodeGen/MachineConstantPool.h') 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 +#include #include 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; -- cgit v1.2.3-18-g5258