| 48 | } |
| 49 | |
| 50 | void BasicBlock::addInstrAt(unique_ptr<Instr> &&i, const Instr *other, |
| 51 | bool before) { |
| 52 | for (auto I = m_instrs.begin(); true; ++I) { |
| 53 | assert(I != m_instrs.end()); |
| 54 | if (I->get() == other) { |
| 55 | if (!before) |
| 56 | ++I; |
| 57 | m_instrs.emplace(I, std::move(i)); |
| 58 | break; |
| 59 | } |
| 60 | } |
| 61 | } |
| 62 | |
| 63 | void BasicBlock::delInstr(const Instr *i) { |
| 64 | for (auto I = m_instrs.begin(), E = m_instrs.end(); I != E; ++I) { |
no test coverage detected