MCPcopy Create free account
hub / github.com/chigraph/chigraph / lineNumberFromNode

Function lineNumberFromNode

libchigraphdebugger/src/Debugger.cpp:279–286  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

277}
278
279unsigned lineNumberFromNode(NodeInstance& inst) {
280 // TODO: cache these, they're kinda expensive to make
281 auto lineAssoc = inst.module().createLineNumberAssoc();
282 auto lineNumberIter = lineAssoc.right.find(&inst);
283 if (lineNumberIter == lineAssoc.right.end()) { return -1; }
284
285 return lineNumberIter->second;
286}
287
288} // namespace chi

Callers 1

setBreakpointMethod · 0.85

Calls 2

createLineNumberAssocMethod · 0.80
endMethod · 0.80

Tested by

no test coverage detected