| 414 | } |
| 415 | |
| 416 | Instruction* DebugInfoManager::GetEmptyDebugExpression() { |
| 417 | if (empty_debug_expr_inst_ != nullptr) return empty_debug_expr_inst_; |
| 418 | |
| 419 | uint32_t result_id = context()->TakeNextId(); |
| 420 | std::unique_ptr<Instruction> empty_debug_expr(new Instruction( |
| 421 | context(), spv::Op::OpExtInst, context()->get_type_mgr()->GetVoidTypeId(), |
| 422 | result_id, |
| 423 | { |
| 424 | {spv_operand_type_t::SPV_OPERAND_TYPE_ID, {GetDbgSetImportId()}}, |
| 425 | {spv_operand_type_t::SPV_OPERAND_TYPE_EXTENSION_INSTRUCTION_NUMBER, |
| 426 | {static_cast<uint32_t>(CommonDebugInfoDebugExpression)}}, |
| 427 | })); |
| 428 | |
| 429 | // Add to the front of |ext_inst_debuginfo_|. |
| 430 | empty_debug_expr_inst_ = |
| 431 | context()->module()->ext_inst_debuginfo_begin()->InsertBefore( |
| 432 | std::move(empty_debug_expr)); |
| 433 | |
| 434 | RegisterDbgInst(empty_debug_expr_inst_); |
| 435 | if (context()->AreAnalysesValid(IRContext::Analysis::kAnalysisDefUse)) |
| 436 | context()->get_def_use_mgr()->AnalyzeInstDefUse(empty_debug_expr_inst_); |
| 437 | return empty_debug_expr_inst_; |
| 438 | } |
| 439 | |
| 440 | Instruction* DebugInfoManager::GetDebugInlinedAt(uint32_t dbg_inlined_at_id) { |
| 441 | auto* inlined_at = GetDbgInst(dbg_inlined_at_id); |
nothing calls this directly
no test coverage detected