| 748 | } |
| 749 | |
| 750 | bool InstructionIsFunctionParameter(opt::Instruction* instruction, |
| 751 | opt::Function* function) { |
| 752 | if (instruction->opcode() != spv::Op::OpFunctionParameter) { |
| 753 | return false; |
| 754 | } |
| 755 | bool found_parameter = false; |
| 756 | function->ForEachParam( |
| 757 | [instruction, &found_parameter](opt::Instruction* param) { |
| 758 | if (param == instruction) { |
| 759 | found_parameter = true; |
| 760 | } |
| 761 | }); |
| 762 | return found_parameter; |
| 763 | } |
| 764 | |
| 765 | uint32_t GetTypeId(opt::IRContext* context, uint32_t result_id) { |
| 766 | const auto* inst = context->get_def_use_mgr()->GetDef(result_id); |
no test coverage detected