MCPcopy Create free account
hub / github.com/csmith-project/csmith / has_edge_in

Method has_edge_in

src/Statement.cpp:444–459  ·  view source on GitHub ↗

* return true if there is CFG edge(s) leading to this statement matching given attributes */

Source from the content-addressed store, hash-verified

442 * return true if there is CFG edge(s) leading to this statement matching given attributes
443 */
444bool
445Statement::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"

Callers

nothing calls this directly

Calls 2

get_fact_mgr_for_funcFunction · 0.85
sizeMethod · 0.80

Tested by

no test coverage detected