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

Function ValidateConstructSize

source/val/construct.cpp:42–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40}
41
42bool ValidateConstructSize(ConstructType type, size_t size) {
43 switch (type) {
44 case ConstructType::kSelection:
45 return size == 0;
46 case ConstructType::kContinue:
47 return size == 1;
48 case ConstructType::kLoop:
49 return size == 1;
50 case ConstructType::kCase:
51 return size >= 1;
52 default:
53 assert(1 == 0 && "Type not defined");
54 }
55 return false;
56}
57
58void Construct::set_corresponding_constructs(
59 std::vector<Construct*> constructs) {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected