| 586 | /* ── Dead-code classification (distilled from PR #789) ────────── */ |
| 587 | |
| 588 | static const cbm_layout_node_t *find_layout_node(const cbm_layout_result_t *r, const char *name) { |
| 589 | for (int i = 0; i < r->node_count; i++) { |
| 590 | if (r->nodes[i].name && strcmp(r->nodes[i].name, name) == 0) { |
| 591 | return &r->nodes[i]; |
| 592 | } |
| 593 | } |
| 594 | return NULL; |
| 595 | } |
| 596 | |
| 597 | /* A function with zero callers/usages and no entry/test/exported flag is |
| 598 | * "dead"; entry-point, test, and exported functions are NOT dead even at zero |