| 256 | } |
| 257 | |
| 258 | inline bool BasicBlock::WhileEachInst( |
| 259 | const std::function<bool(Instruction*)>& f, bool run_on_debug_line_insts) { |
| 260 | if (label_) { |
| 261 | if (!label_->WhileEachInst(f, run_on_debug_line_insts)) return false; |
| 262 | } |
| 263 | if (insts_.empty()) { |
| 264 | return true; |
| 265 | } |
| 266 | |
| 267 | Instruction* inst = &insts_.front(); |
| 268 | while (inst != nullptr) { |
| 269 | Instruction* next_instruction = inst->NextNode(); |
| 270 | if (!inst->WhileEachInst(f, run_on_debug_line_insts)) return false; |
| 271 | inst = next_instruction; |
| 272 | } |
| 273 | return true; |
| 274 | } |
| 275 | |
| 276 | inline bool BasicBlock::WhileEachInst( |
| 277 | const std::function<bool(const Instruction*)>& f, |
no test coverage detected