MCPcopy Create free account
hub / github.com/KhronosGroup/SPIRV-Tools / ValidateLine

Function ValidateLine

source/val/validate_debug.cpp:43–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41}
42
43spv_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

Callers 1

DebugPassFunction · 0.85

Calls 4

FindDefMethod · 0.80
diagMethod · 0.80
getIdNameMethod · 0.80
opcodeMethod · 0.45

Tested by

no test coverage detected