forked from OSchip/llvm-project
RegisterClassInfo::computePSetLimit - assert that we actually find a register.
Fixes "pointer is null" clang static analyzer warning.
This commit is contained in:
parent
7b15865225
commit
0b64400e0b
|
@ -186,6 +186,7 @@ unsigned RegisterClassInfo::computePSetLimit(unsigned Idx) const {
|
|||
NumRCUnits = NUnits;
|
||||
}
|
||||
}
|
||||
assert(RC && "Failed to find register class");
|
||||
compute(RC);
|
||||
unsigned NReserved = RC->getNumRegs() - getNumAllocatableRegs(RC);
|
||||
return TRI->getRegPressureSetLimit(*MF, Idx) -
|
||||
|
|
Loading…
Reference in New Issue