| 217 | } |
| 218 | |
| 219 | const SVFVar* ThreadAPI::getJoinedThread(const CallICFGNode *cs) const |
| 220 | { |
| 221 | assert(isTDJoin(cs) && "not a thread join function!"); |
| 222 | const ValVar* join = cs->getArgument(0); |
| 223 | for(const SVFStmt* stmt : join->getInEdges()) |
| 224 | { |
| 225 | if(SVFUtil::isa<LoadStmt>(stmt)) |
| 226 | return stmt->getSrcNode(); |
| 227 | } |
| 228 | if(SVFUtil::isa<ArgValVar>(join)) |
| 229 | return join; |
| 230 | |
| 231 | assert(false && "the value of the first argument at join is not a load instruction?"); |
| 232 | return nullptr; |
| 233 | } |
| 234 | |
| 235 | /*! |
| 236 | * |
no test coverage detected