MCPcopy Create free account
hub / github.com/KhronosGroup/glslang / nextSwitchSegment

Method nextSwitchSegment

SPIRV/SpvBuilder.cpp:4536–4547  ·  view source on GitHub ↗

Comments in header

Source from the content-addressed store, hash-verified

4534
4535// Comments in header
4536void Builder::nextSwitchSegment(std::vector<Block*>& segmentBlock, int nextSegment)
4537{
4538 int lastSegment = nextSegment - 1;
4539 if (lastSegment >= 0) {
4540 // Close out previous segment by jumping, if necessary, to next segment
4541 if (! buildPoint->isTerminated())
4542 createBranch(true, segmentBlock[nextSegment]);
4543 }
4544 Block* block = segmentBlock[nextSegment];
4545 block->getParent().addBlock(block);
4546 setBuildPoint(block);
4547}
4548
4549// Comments in header
4550void Builder::endSwitch(std::vector<Block*>& /*segmentBlock*/)

Callers 1

visitSwitchMethod · 0.80

Calls 2

isTerminatedMethod · 0.80
addBlockMethod · 0.80

Tested by

no test coverage detected