From e3be025dcc49cfa4c1b8065f541193be9b4847f0 Mon Sep 17 00:00:00 2001 From: Gerion Entrup Date: Tue, 15 Nov 2022 10:40:24 +0100 Subject: [PATCH] SVFG: refactor fromValue to use SVFIR --- lib/Graphs/SVFG.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/Graphs/SVFG.cpp b/lib/Graphs/SVFG.cpp index f28fe76c0..7962323fb 100644 --- a/lib/Graphs/SVFG.cpp +++ b/lib/Graphs/SVFG.cpp @@ -577,22 +577,22 @@ void SVFG::dump(const std::string& file, bool simple) std::set SVFG::fromValue(const llvm::Value* value) const { - SVFIR* pag = SVFIR::getPAG(); + SVFIR* svfir = SVFIR::getPAG(); std::set ret; - // search for all PAGEdges first - for (const PAGEdge* pagEdge : pag->getValueEdges(value)) + // search for all SVFStmts first + for (const SVFStmt* svfStmt : svfir->getValueEdges(value)) { - PAGEdgeToStmtVFGNodeMapTy::const_iterator it = PAGEdgeToStmtVFGNodeMap.find(pagEdge); + PAGEdgeToStmtVFGNodeMapTy::const_iterator it = PAGEdgeToStmtVFGNodeMap.find(svfStmt); if (it != PAGEdgeToStmtVFGNodeMap.end()) { ret.emplace(it->second); } } - // add all PAGNodes - PAGNode* pagNode = pag->getGNode(pag->getValueNode(value)); - if(hasDef(pagNode)) + // add all SVFVars + SVFVar* svfVar = svfir->getGNode(svfir->getValueNode(value)); + if(hasDef(svfVar)) { - ret.emplace(getDefSVFGNode(pagNode)); + ret.emplace(getDefSVFGNode(svfVar)); } return ret; }