| 180 | } |
| 181 | |
| 182 | inline void addPredBasicBlock(const SVFBasicBlock* pred2) |
| 183 | { |
| 184 | // check if the edge already exists |
| 185 | for (auto edge: this->getInEdges()) |
| 186 | { |
| 187 | if (edge->getSrcNode() == pred2) |
| 188 | return; |
| 189 | } |
| 190 | SVFBasicBlock* pred = const_cast<SVFBasicBlock*>(pred2); |
| 191 | BasicBlockEdge* edge = new BasicBlockEdge(pred, this); |
| 192 | this->addIncomingEdge(edge); |
| 193 | pred->addOutgoingEdge(edge); |
| 194 | this->predBBs.push_back(pred); |
| 195 | pred->succBBs.push_back(this); |
| 196 | } |
| 197 | |
| 198 | inline const FunObjVar* getParent() const |
| 199 | { |
no test coverage detected