| 170 | } |
| 171 | |
| 172 | void BasicBlock::ForMergeAndContinueLabel( |
| 173 | const std::function<void(const uint32_t)>& f) { |
| 174 | auto ii = insts_.end(); |
| 175 | --ii; |
| 176 | if (ii == insts_.begin()) return; |
| 177 | --ii; |
| 178 | if (ii->opcode() == spv::Op::OpSelectionMerge || |
| 179 | ii->opcode() == spv::Op::OpLoopMerge) { |
| 180 | ii->ForEachInId([&f](const uint32_t* idp) { f(*idp); }); |
| 181 | } |
| 182 | } |
| 183 | |
| 184 | uint32_t BasicBlock::MergeBlockIdIfAny() const { |
| 185 | auto merge_ii = cend(); |
no test coverage detected