* return true if there is CFG edge(s) leading to this statement matching given attributes */
| 442 | * return true if there is CFG edge(s) leading to this statement matching given attributes |
| 443 | */ |
| 444 | bool |
| 445 | Statement::has_edge_in(bool post_dest, bool back_link) const |
| 446 | { |
| 447 | if (func != 0) { |
| 448 | FactMgr* fm = get_fact_mgr_for_func(func); |
| 449 | assert(fm); |
| 450 | size_t i; |
| 451 | for (i=0; i<fm->cfg_edges.size(); i++) { |
| 452 | const CFGEdge* e = fm->cfg_edges[i]; |
| 453 | if (e->dest == this && e->back_link == back_link && e->post_dest == post_dest) { |
| 454 | return true; |
| 455 | } |
| 456 | } |
| 457 | } |
| 458 | return false; |
| 459 | } |
| 460 | |
| 461 | /* |
| 462 | * find CFG edges leading to this statement, found edges are stored in pass-in param "edges" |
nothing calls this directly
no test coverage detected