| 538 | } |
| 539 | |
| 540 | spv_result_t ValidateConstantNull(ValidationState_t& _, |
| 541 | const Instruction* inst) { |
| 542 | const auto result_type = _.FindDef(inst->type_id()); |
| 543 | if (!result_type || !IsTypeNullable(result_type->words(), _)) { |
| 544 | return _.diag(SPV_ERROR_INVALID_ID, inst) |
| 545 | << "OpConstantNull Result Type <id> " << _.getIdName(inst->type_id()) |
| 546 | << " cannot have a null value."; |
| 547 | } |
| 548 | |
| 549 | return SPV_SUCCESS; |
| 550 | } |
| 551 | |
| 552 | spv_result_t ValidateConstantSizeOfEXT(ValidationState_t& _, |
| 553 | const Instruction* inst) { |
no test coverage detected