diff options
Diffstat (limited to 'include/llvm/CodeGen/LiveInterval.h')
-rw-r--r-- | include/llvm/CodeGen/LiveInterval.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/include/llvm/CodeGen/LiveInterval.h b/include/llvm/CodeGen/LiveInterval.h index 8e99ee7e29..c75d5947b9 100644 --- a/include/llvm/CodeGen/LiveInterval.h +++ b/include/llvm/CodeGen/LiveInterval.h @@ -25,6 +25,7 @@ #include "llvm/Support/Allocator.h" #include <iosfwd> #include <cassert> +#include <climits> namespace llvm { class MachineInstr; @@ -115,7 +116,7 @@ namespace llvm { LiveInterval(unsigned Reg, float Weight, bool IsSS = false) : reg(Reg), weight(Weight), preference(0) { if (IsSS) - reg = reg | (1U << (sizeof(unsigned)*8-1)); + reg = reg | (1U << (sizeof(unsigned)*CHAR_BIT-1)); } typedef Ranges::iterator iterator; @@ -159,14 +160,14 @@ namespace llvm { /// isStackSlot - Return true if this is a stack slot interval. /// bool isStackSlot() const { - return reg & (1U << (sizeof(unsigned)*8-1)); + return reg & (1U << (sizeof(unsigned)*CHAR_BIT-1)); } /// getStackSlotIndex - Return stack slot index if this is a stack slot /// interval. int getStackSlotIndex() const { assert(isStackSlot() && "Interval is not a stack slot interval!"); - return reg & ~(1U << (sizeof(unsigned)*8-1)); + return reg & ~(1U << (sizeof(unsigned)*CHAR_BIT-1)); } bool hasAtLeastOneValue() const { return !valnos.empty(); } |