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

Method UpdateDebugInfoFrom

source/opt/instruction.cpp:556–572  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

554}
555
556bool 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
574bool Instruction::AddDebugLine(const Instruction* inst) {
575 dbg_line_insts_.push_back(*inst);

Callers 9

ReplaceWholeLoadMethod · 0.80
ReplaceWholeStoreMethod · 0.80
ReplaceAccessChainMethod · 0.80
CreateVariableMethod · 0.80
ProcessMethod · 0.80
AddDebugValueForDeclMethod · 0.80

Calls 6

IsLineInstFunction · 0.85
backMethod · 0.80
AreAnalysesValidMethod · 0.80
AnalyzeDebugInstMethod · 0.80
get_debug_info_mgrMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected