| 86 | } |
| 87 | |
| 88 | void InlinePass::AddStore(uint32_t ptr_id, uint32_t val_id, |
| 89 | std::unique_ptr<BasicBlock>* block_ptr, |
| 90 | const Instruction* line_inst, |
| 91 | const DebugScope& dbg_scope) { |
| 92 | std::unique_ptr<Instruction> newStore( |
| 93 | new Instruction(context(), spv::Op::OpStore, 0, 0, |
| 94 | {{spv_operand_type_t::SPV_OPERAND_TYPE_ID, {ptr_id}}, |
| 95 | {spv_operand_type_t::SPV_OPERAND_TYPE_ID, {val_id}}})); |
| 96 | if (line_inst != nullptr) { |
| 97 | newStore->AddDebugLine(line_inst); |
| 98 | } |
| 99 | newStore->SetDebugScope(dbg_scope); |
| 100 | (*block_ptr)->AddInstruction(std::move(newStore)); |
| 101 | } |
| 102 | |
| 103 | void InlinePass::AddLoad(uint32_t type_id, uint32_t resultId, uint32_t ptr_id, |
| 104 | std::unique_ptr<BasicBlock>* block_ptr, |
no test coverage detected