forked from OSchip/llvm-project
Fix crash in machine verifier when trying to print the def of a register which has no def
llvm-svn: 160531
This commit is contained in:
parent
3136cf9d5b
commit
dcf94db677
|
@ -837,6 +837,8 @@ void MachineVerifier::checkLiveness(const MachineOperand *MO, unsigned MONum) {
|
|||
// Reserved registers may be used even when 'dead'.
|
||||
if (!isReserved(Reg))
|
||||
report("Using an undefined physical register", MO, MONum);
|
||||
} else if (MRI->def_empty(Reg)) {
|
||||
report("Reading virtual register without a def", MO, MONum);
|
||||
} else {
|
||||
BBInfo &MInfo = MBBInfoMap[MI->getParent()];
|
||||
// We don't know which virtual registers are live in, so only complain
|
||||
|
|
Loading…
Reference in New Issue