Fix a silly off by one.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135842 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Benjamin Kramer 2011-07-23 03:04:46 +00:00
parent a397a11c7c
commit 59a4f9af0a

View File

@ -76,7 +76,7 @@ public:
bool contains(unsigned Reg) const { bool contains(unsigned Reg) const {
unsigned InByte = Reg % 8; unsigned InByte = Reg % 8;
unsigned Byte = Reg / 8; unsigned Byte = Reg / 8;
if (Byte > RegSetSize) if (Byte >= RegSetSize)
return false; return false;
return (RegSet[Byte] & (1 << InByte)) != 0; return (RegSet[Byte] & (1 << InByte)) != 0;
} }