| 1038 | } |
| 1039 | |
| 1040 | opt::Function* GetFunctionFromParameterId(opt::IRContext* ir_context, |
| 1041 | uint32_t param_id) { |
| 1042 | auto* param_inst = ir_context->get_def_use_mgr()->GetDef(param_id); |
| 1043 | assert(param_inst && "Parameter id is invalid"); |
| 1044 | |
| 1045 | for (auto& function : *ir_context->module()) { |
| 1046 | if (InstructionIsFunctionParameter(param_inst, &function)) { |
| 1047 | return &function; |
| 1048 | } |
| 1049 | } |
| 1050 | |
| 1051 | return nullptr; |
| 1052 | } |
| 1053 | |
| 1054 | uint32_t UpdateFunctionType(opt::IRContext* ir_context, uint32_t function_id, |
| 1055 | uint32_t new_function_type_result_id, |
no test coverage detected