MCPcopy Create free account
hub / github.com/KhronosGroup/SPIRV-Tools / CloneDebugInlinedAt

Method CloneDebugInlinedAt

source/opt/debug_info_manager.cpp:449–462  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

447}
448
449Instruction* 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
464bool DebugInfoManager::IsVariableDebugDeclared(uint32_t variable_id) {
465 auto dbg_decl_itr = var_id_to_dbg_decl_.find(variable_id);

Callers 1

TESTFunction · 0.80

Calls 10

getMethod · 0.80
AreAnalysesValidMethod · 0.80
AnalyzeInstDefUseMethod · 0.80
CloneMethod · 0.45
SetResultIdMethod · 0.45
TakeNextIdMethod · 0.45
get_def_use_mgrMethod · 0.45
InsertBeforeMethod · 0.45
moduleMethod · 0.45

Tested by 1

TESTFunction · 0.64