| 447 | } |
| 448 | |
| 449 | Instruction* DebugInfoManager::CloneDebugInlinedAt(uint32_t clone_inlined_at_id, |
| 450 | Instruction* insert_before) { |
| 451 | auto* inlined_at = GetDebugInlinedAt(clone_inlined_at_id); |
| 452 | if (inlined_at == nullptr) return nullptr; |
| 453 | std::unique_ptr<Instruction> new_inlined_at(inlined_at->Clone(context())); |
| 454 | new_inlined_at->SetResultId(context()->TakeNextId()); |
| 455 | RegisterDbgInst(new_inlined_at.get()); |
| 456 | if (context()->AreAnalysesValid(IRContext::Analysis::kAnalysisDefUse)) |
| 457 | context()->get_def_use_mgr()->AnalyzeInstDefUse(new_inlined_at.get()); |
| 458 | if (insert_before != nullptr) |
| 459 | return insert_before->InsertBefore(std::move(new_inlined_at)); |
| 460 | return context()->module()->ext_inst_debuginfo_end()->InsertBefore( |
| 461 | std::move(new_inlined_at)); |
| 462 | } |
| 463 | |
| 464 | bool DebugInfoManager::IsVariableDebugDeclared(uint32_t variable_id) { |
| 465 | auto dbg_decl_itr = var_id_to_dbg_decl_.find(variable_id); |