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

Function VerifyIds

source/link/linker.cpp:709–724  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

707}
708
709spv_result_t VerifyIds(const MessageConsumer& consumer,
710 opt::IRContext* linked_context) {
711 std::unordered_set<uint32_t> ids;
712 bool ok = true;
713 linked_context->module()->ForEachInst(
714 [&ids, &ok](const opt::Instruction* inst) {
715 ok &= ids.insert(inst->unique_id()).second;
716 });
717
718 if (!ok) {
719 consumer(SPV_MSG_INTERNAL_ERROR, "", {}, "Non-unique id in merged module");
720 return SPV_ERROR_INVALID_ID;
721 }
722
723 return SPV_SUCCESS;
724}
725
726spv_result_t VerifyLimits(const MessageConsumer& consumer,
727 const opt::IRContext& linked_context) {

Callers 1

LinkFunction · 0.85

Calls 4

unique_idMethod · 0.80
ForEachInstMethod · 0.45
moduleMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected