MCPcopy Create free account
hub / github.com/FastLED/FastLED / build_reverse_call_graph

Function build_reverse_call_graph

ci/util/symbol_analysis.py:503–511  ·  view source on GitHub ↗

Build reverse call graph: function -> list of functions that call it

(call_graph: dict[str, list[str]])

Source from the content-addressed store, hash-verified

501
502
503def build_reverse_call_graph(call_graph: dict[str, list[str]]) -> dict[str, list[str]]:
504 """Build reverse call graph: function -> list of functions that call it"""
505 reverse_graph: defaultdict[str, list[str]] = defaultdict(list)
506
507 for caller, callees in call_graph.items():
508 for callee in callees:
509 reverse_graph[callee].append(caller)
510
511 return dict(reverse_graph)
512
513
514def analyze_map_file(map_file: Path) -> dict[str, list[str]]:

Callers 2

mainFunction · 0.85

Calls 2

itemsMethod · 0.80
appendMethod · 0.45

Tested by 1