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

Function FirstBlockAssert

source/val/validate_cfg.cpp:397–405  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

395 if (spv_result_t rcode = ASSERT_FUNC(_, TARGET)) return rcode
396
397spv_result_t FirstBlockAssert(ValidationState_t& _, uint32_t target) {
398 if (_.current_function().IsFirstBlock(target)) {
399 return _.diag(SPV_ERROR_INVALID_CFG, _.FindDef(_.current_function().id()))
400 << "First block " << _.getIdName(target) << " of function "
401 << _.getIdName(_.current_function().id()) << " is targeted by block "
402 << _.getIdName(_.current_function().current_block()->id());
403 }
404 return SPV_SUCCESS;
405}
406
407spv_result_t MergeBlockAssert(ValidationState_t& _, uint32_t merge_block) {
408 if (_.current_function().IsBlockType(merge_block, kBlockTypeMerge)) {

Callers

nothing calls this directly

Calls 6

IsFirstBlockMethod · 0.80
diagMethod · 0.80
FindDefMethod · 0.80
getIdNameMethod · 0.80
current_blockMethod · 0.80
idMethod · 0.45

Tested by

no test coverage detected