Check register classes also when changing them.

We have the same assertion in createVirtualRegister.

llvm-svn: 176959
This commit is contained in:
Jakob Stoklund Olesen 2013-03-13 18:11:17 +00:00
parent 3294ca42bf
commit e1dec0ef60

View File

@ -37,6 +37,7 @@ MachineRegisterInfo::~MachineRegisterInfo() {
///
void
MachineRegisterInfo::setRegClass(unsigned Reg, const TargetRegisterClass *RC) {
assert(RC && RC->isAllocatable() && "Invalid RC for virtual register");
VRegInfo[Reg].first = RC;
}