diff options
Diffstat (limited to 'backend/lib/CodeGen/TargetDescription.cpp')
| -rw-r--r-- | backend/lib/CodeGen/TargetDescription.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/backend/lib/CodeGen/TargetDescription.cpp b/backend/lib/CodeGen/TargetDescription.cpp index 3a6ea31..a32534d 100644 --- a/backend/lib/CodeGen/TargetDescription.cpp +++ b/backend/lib/CodeGen/TargetDescription.cpp @@ -203,6 +203,13 @@ Expected<void> TargetDescription::validateTargetOperand(const OperandDescriptor } return Registers.validateRegisterMask(*Mask->Mask); } + if (const auto *Mask = Operand.getIf<LiveOutRegisterMaskOperand>(); Mask != nullptr) { + if (!Mask->Mask) { + return makeUnexpected(ErrorCode::VerificationError, + "live-out register-mask operand contains a null mask"); + } + return Registers.validateRegisterMask(*Mask->Mask); + } const Register *Reg = Operand.getIf<Register>(); if (Reg == nullptr) |
