Add a missing assertion, the null register has no register units.

llvm-svn: 170916
This commit is contained in:
Jakob Stoklund Olesen 2012-12-21 18:38:09 +00:00
parent 7b5bfc795a
commit 0edb164723
1 changed files with 1 additions and 0 deletions

View File

@ -479,6 +479,7 @@ public:
/// MCRegUnitIterator - Create an iterator that traverses the register units
/// in Reg.
MCRegUnitIterator(unsigned Reg, const MCRegisterInfo *MCRI) {
assert(Reg && "Null register has no regunits");
// Decode the RegUnits MCRegisterDesc field.
unsigned RU = MCRI->get(Reg).RegUnits;
unsigned Scale = RU & 15;