| 554 | } |
| 555 | |
| 556 | bool Instruction::UpdateDebugInfoFrom(const Instruction* from, |
| 557 | const Instruction* line) { |
| 558 | if (from == nullptr) return true; |
| 559 | ClearDbgLineInsts(); |
| 560 | const Instruction* fromLine = line != nullptr ? line : from; |
| 561 | if (!fromLine->dbg_line_insts().empty()) { |
| 562 | if (!AddDebugLine(&fromLine->dbg_line_insts().back())) { |
| 563 | return false; |
| 564 | } |
| 565 | } |
| 566 | SetDebugScope(from->GetDebugScope()); |
| 567 | if (!IsLineInst() && |
| 568 | context()->AreAnalysesValid(IRContext::kAnalysisDebugInfo)) { |
| 569 | context()->get_debug_info_mgr()->AnalyzeDebugInst(this); |
| 570 | } |
| 571 | return true; |
| 572 | } |
| 573 | |
| 574 | bool Instruction::AddDebugLine(const Instruction* inst) { |
| 575 | dbg_line_insts_.push_back(*inst); |
no test coverage detected