| 41 | } |
| 42 | |
| 43 | spv_result_t ValidateLine(ValidationState_t& _, const Instruction* inst) { |
| 44 | const auto file_id = inst->GetOperandAs<uint32_t>(0); |
| 45 | const auto file = _.FindDef(file_id); |
| 46 | if (!file || spv::Op::OpString != file->opcode()) { |
| 47 | return _.diag(SPV_ERROR_INVALID_ID, inst) |
| 48 | << "OpLine Target <id> " << _.getIdName(file_id) |
| 49 | << " is not an OpString."; |
| 50 | } |
| 51 | return SPV_SUCCESS; |
| 52 | } |
| 53 | |
| 54 | } // namespace |
| 55 |