| 417 | } |
| 418 | |
| 419 | spv_result_t AssemblyContext::recordIdAsExtInstImport( |
| 420 | uint32_t id, spv_ext_inst_type_t type) { |
| 421 | bool successfully_inserted = false; |
| 422 | std::tie(std::ignore, successfully_inserted) = |
| 423 | import_id_to_ext_inst_type_.insert(std::make_pair(id, type)); |
| 424 | if (!successfully_inserted) |
| 425 | return diagnostic() << "Import Id is being defined a second time"; |
| 426 | return SPV_SUCCESS; |
| 427 | } |
| 428 | |
| 429 | spv_ext_inst_type_t AssemblyContext::getExtInstTypeForId(uint32_t id) const { |
| 430 | auto type = import_id_to_ext_inst_type_.find(id); |
no test coverage detected