Skip to content

Commit

Permalink
change position of param to make it more logical
Browse files Browse the repository at this point in the history
  • Loading branch information
jumormt committed Jan 10, 2025
1 parent 7e42038 commit 7675931
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 12 deletions.
4 changes: 2 additions & 2 deletions svf-llvm/lib/SVFIRBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -246,9 +246,9 @@ void SVFIRBuilder::initialiseNodes()
pag->addFunValNode(cgn, iter->second, icfgNode);
} else if (auto argval = SVFUtil::dyn_cast<Argument>(llvmValue)) {
pag->addArgValNode(
iter->second, argval->getArgNo(), icfgNode,
llvmModuleSet()->getCallGraphNode(argval->getParent()),
argval->getArgNo(), LLVMUtil::isArgOfUncalledFunction(argval), iter->second,
icfgNode);
LLVMUtil::isArgOfUncalledFunction(argval));
llvmModuleSet()->addToLLVMVal2SVFVarMap(
argval, pag->getGNode(iter->second));
}
Expand Down
5 changes: 2 additions & 3 deletions svf/include/SVFIR/SVFIR.h
Original file line number Diff line number Diff line change
Expand Up @@ -578,10 +578,9 @@ class SVFIR : public IRGraph
return addValNode(nullptr, node, i);
}

NodeID addArgValNode(const CallGraphNode* callGraphNode, u32_t argNo,
bool isUncalled, NodeID i, const ICFGNode* icfgNode) {
NodeID addArgValNode(NodeID i, u32_t argNo, const ICFGNode* icfgNode, const CallGraphNode* callGraphNode, bool isUncalled) {
ArgValVar* node =
new ArgValVar(i, callGraphNode, argNo, isUncalled, icfgNode);
new ArgValVar(i, argNo, icfgNode, callGraphNode, isUncalled);
return addValNode(nullptr, node, i);
}

Expand Down
4 changes: 2 additions & 2 deletions svf/include/SVFIR/SVFVariables.h
Original file line number Diff line number Diff line change
Expand Up @@ -428,8 +428,8 @@ class ArgValVar: public ValVar {
//@}

/// Constructor
ArgValVar(NodeID i, const CallGraphNode* callGraphNode, u32_t argNo,
bool isUncalled, const ICFGNode* icn, PNODEK ty = ArgNode);
ArgValVar(NodeID i, u32_t argNo, const ICFGNode* icn, const CallGraphNode* callGraphNode,
bool isUncalled = false, PNODEK ty = ArgNode);

/// Return name of a LLVM value
inline const std::string getValueName() const
Expand Down
10 changes: 5 additions & 5 deletions svf/lib/SVFIR/SVFVariables.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,11 @@ const std::string ObjVar::toString() const
return rawstr.str();
}

ArgValVar::ArgValVar(SVF::NodeID i, const SVF::CallGraphNode* callGraphNode,
SVF::u32_t argNo, bool isUncalled,
const SVF::ICFGNode* icn, SVF::SVFVar::PNODEK ty)
: ValVar(callGraphNode->getFunction()->getArg(argNo), i, ty, icn), cgNode(callGraphNode),
argNo(argNo), uncalled(isUncalled)
ArgValVar::ArgValVar(NodeID i, u32_t argNo, const ICFGNode* icn,
const SVF::CallGraphNode* callGraphNode, bool isUncalled,
SVF::SVFVar::PNODEK ty)
: ValVar(callGraphNode->getFunction()->getArg(argNo), i, ty, icn),
cgNode(callGraphNode), argNo(argNo), uncalled(isUncalled)
{
isPtr =
callGraphNode->getFunction()->getArg(argNo)->getType()->isPointerTy();
Expand Down

0 comments on commit 7675931

Please sign in to comment.