| 432 | } |
| 433 | |
| 434 | uint32_t FuzzerPass::FindOrCreateGlobalUndef(uint32_t type_id) { |
| 435 | for (auto& inst : GetIRContext()->types_values()) { |
| 436 | if (inst.opcode() == spv::Op::OpUndef && inst.type_id() == type_id) { |
| 437 | return inst.result_id(); |
| 438 | } |
| 439 | } |
| 440 | auto result = GetFuzzerContext()->GetFreshId(); |
| 441 | ApplyTransformation(TransformationAddGlobalUndef(result, type_id)); |
| 442 | return result; |
| 443 | } |
| 444 | |
| 445 | uint32_t FuzzerPass::FindOrCreateNullConstant(uint32_t type_id) { |
| 446 | // Find existing declaration |
no test coverage detected