| 202 | } |
| 203 | |
| 204 | BasicBlock* Function::InsertBasicBlockAfter( |
| 205 | std::unique_ptr<BasicBlock>&& new_block, BasicBlock* position) { |
| 206 | for (auto bb_iter = begin(); bb_iter != end(); ++bb_iter) { |
| 207 | if (&*bb_iter == position) { |
| 208 | new_block->SetParent(this); |
| 209 | ++bb_iter; |
| 210 | bb_iter = bb_iter.InsertBefore(std::move(new_block)); |
| 211 | return &*bb_iter; |
| 212 | } |
| 213 | } |
| 214 | assert(false && "Could not find insertion point."); |
| 215 | return nullptr; |
| 216 | } |
| 217 | |
| 218 | BasicBlock* Function::InsertBasicBlockBefore( |
| 219 | std::unique_ptr<BasicBlock>&& new_block, BasicBlock* position) { |
no test coverage detected