MCPcopy Create free account
hub / github.com/KhronosGroup/SPIRV-Tools / recordIdAsExtInstImport

Method recordIdAsExtInstImport

source/text_handler.cpp:419–427  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

417}
418
419spv_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
429spv_ext_inst_type_t AssemblyContext::getExtInstTypeForId(uint32_t id) const {
430 auto type = import_id_to_ext_inst_type_.find(id);

Callers 1

spvTextEncodeOperandFunction · 0.80

Calls 1

insertMethod · 0.45

Tested by

no test coverage detected