[llvm-commits] [llvm] r135842 - /llvm/trunk/include/llvm/MC/MCRegisterInfo.h
Benjamin Kramer
benny.kra at googlemail.com
Fri Jul 22 20:04:47 PDT 2011
Author: d0k
Date: Fri Jul 22 22:04:46 2011
New Revision: 135842
URL: http://llvm.org/viewvc/llvm-project?rev=135842&view=rev
Log:
Fix a silly off by one.
Modified:
llvm/trunk/include/llvm/MC/MCRegisterInfo.h
Modified: llvm/trunk/include/llvm/MC/MCRegisterInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCRegisterInfo.h?rev=135842&r1=135841&r2=135842&view=diff
==============================================================================
--- llvm/trunk/include/llvm/MC/MCRegisterInfo.h (original)
+++ llvm/trunk/include/llvm/MC/MCRegisterInfo.h Fri Jul 22 22:04:46 2011
@@ -76,7 +76,7 @@
bool contains(unsigned Reg) const {
unsigned InByte = Reg % 8;
unsigned Byte = Reg / 8;
- if (Byte > RegSetSize)
+ if (Byte >= RegSetSize)
return false;
return (RegSet[Byte] & (1 << InByte)) != 0;
}
More information about the llvm-commits
mailing list