Skip to content

Commit

Permalink
Merge pull request #1611 from jumormt/master
Browse files Browse the repository at this point in the history
add value back for heap/stack/fun
  • Loading branch information
yuleisui authored Dec 18, 2024
2 parents f0c7d04 + dab000b commit 0f3f2c6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions svf/lib/SVFIR/SVFVariables.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ const std::string BaseObjVar::toString() const

HeapObjVar::HeapObjVar(const SVFFunction* f, const SVFType* svfType, NodeID i,
const MemObj* mem, PNODEK ty)
: BaseObjVar(nullptr, i, mem, ty)
: BaseObjVar(mem->getValue(), i, mem, ty)
{
isPtr = svfType->isPointerTy();
func = f;
Expand All @@ -210,7 +210,7 @@ const std::string HeapObjVar::toString() const

StackObjVar::StackObjVar(const SVFFunction* f, const SVFType* svfType, NodeID i,
const MemObj* mem, PNODEK ty)
: BaseObjVar(nullptr, i, mem, ty)
: BaseObjVar(mem->getValue(), i, mem, ty)
{
isPtr = svfType->isPointerTy();
func = f;
Expand All @@ -233,7 +233,7 @@ const std::string StackObjVar::toString() const

FunValVar::FunValVar(const CallGraphNode* cgn, NodeID i, const ICFGNode* icn,
PNODEK ty)
: ValVar(nullptr, i, ty, icn), callGraphNode(cgn)
: ValVar(cgn->getFunction(), i, ty, icn), callGraphNode(cgn)
{
isPtr = cgn->getFunction()->getType()->isPointerTy();
}
Expand All @@ -253,7 +253,7 @@ const std::string FunValVar::toString() const

FunObjVar::FunObjVar(const CallGraphNode* cgNode, NodeID i, const MemObj* mem,
PNODEK ty)
: BaseObjVar(nullptr, i, mem, ty), callGraphNode(cgNode)
: BaseObjVar(mem->getValue(), i, mem, ty), callGraphNode(cgNode)
{
isPtr = callGraphNode->getFunction()->getType()->isPointerTy();
}
Expand Down

0 comments on commit 0f3f2c6

Please sign in to comment.