36using namespace SVFUtil;
51 return fun->isUncalledFunction();
119 cgNode(callGraphNode), argNo(argNo)
232 rawstr <<
"BaseObjVar ID: " <<
getId() <<
" (base object)";
479 rawstr <<
"FunObjVar ID: " <<
getId() <<
" (base object)";
bool isArgOfUncalledFunction() const
ArgValVar(NodeID i, PNODEK ty=ArgValNode)
Constructor to create function argument (for SVFIRReader/deserialization)
virtual const FunObjVar * getFunction() const
Get containing function, or null for globals/constants.
virtual bool isPointer() const
Check if this variable represents a pointer.
const FunObjVar * getParent() const
virtual const std::string toString() const
Get string representation.
const ICFGNode * icfgNode
virtual const std::string toString() const
Get string representation.
NodeID getId() const
Get the memory object id.
bool isBlackHoleObj() const
Whether it is a black hole object.
virtual const FunObjVar * getFunction() const
Get containing function, or null for globals/constants.
virtual const std::string toString() const
Get string representation.
virtual const std::string toString() const
Get string representation.
virtual const std::string toString() const
Get string representation.
virtual const std::string toString() const
Get string representation.
virtual const std::string toString() const
Get string representation.
virtual const std::string toString() const
Get string representation.
virtual const std::string toString() const
Get string representation.
virtual const std::string toString() const
Get string representation.
virtual const std::string toString() const
Get string representation.
virtual const std::string toString() const
Get string representation.
virtual const std::string toString() const
Get string representation.
virtual const std::string toString() const
Get string representation.
const ArgValVar * getArg(u32_t idx) const
virtual const std::string toString() const
Get string representation.
virtual const FunObjVar * getFunction() const
Get containing function, or null for globals/constants.
virtual bool isIsolatedNode() const
Check if this node is isolated (no edges) in the SVFIR graph.
bool isAddrTaken
return true if this function is an intrinsic function (e.g., llvm.dbg), which does not reside in the ...
bool isNotRet
return true if this function is never called
SVFLoopAndDomInfo * loopAndDom
FunctionType, which is different from the type (PointerType) of this SVF Function.
const SVFType * getReturnType() const
Returns the FunctionType.
FunObjVar(NodeID i, const ICFGNode *node)
a 'single' basic block having no successors and containing return instruction in a function
std::vector< const ArgValVar * > allArgs
the basic block graph of this function
bool supVarArg
return true if this function never returns
const SVFBasicBlock * exitBlock
all formal arguments of this function
bool isUncalledFunction() const
const SVFFunctionType * funcType
return true if this function supports variable arguments
bool intrinsic
return true if this function does not have a body
const FunObjVar * realDefFun
the loop and dominate information
bool isUncalled
return true if this function is address-taken (for indirect call purposes)
void initFunObjVar(bool decl, bool intrinc, bool addr, bool uncalled, bool notret, bool vararg, const SVFFunctionType *ft, SVFLoopAndDomInfo *ld, const FunObjVar *real, BasicBlockGraph *bbg, const std::vector< const ArgValVar * > &allarg, const SVFBasicBlock *exit)
BasicBlockGraph * bbGraph
the definition of a function across multiple modules
virtual const std::string toString() const
Get string representation.
const FunObjVar * funObjVar
FunValVar(NodeID i, const ICFGNode *icn, const FunObjVar *cgn, const SVFType *svfType)
Constructor.
const GEdgeSetTy & getOutEdges() const
const GEdgeSetTy & getInEdges() const
const BaseObjVar * getBaseObj() const
virtual const std::string toString() const
Get string representation.
virtual const SVFType * getType() const
Return the type of this gep object.
const ValVar * getBaseNode(void) const
Return the base object from which this GEP node came from.
GepValVar(NodeID i)
Constructor to create empty GeValVar (for SVFIRReader/deserialization)
virtual const std::string toString() const
Get string representation.
APOffset getConstantFieldIdx() const
offset of the base value variable
virtual const std::string toString() const
Get string representation.
virtual const std::string toString() const
Get string representation.
virtual const std::string toString() const
Get string representation.
virtual const FunObjVar * getFun() const
Return the function of this ICFGNode.
const SVFType * getFlatternedElemType(const SVFType *baseType, u32_t flatten_idx)
Return the type of a flattened element given a flattened index.
static bool isBlkObj(NodeID id)
virtual const std::string toString() const
Get string representation.
static const Option< bool > ShowSVFIRValue
const FunObjVar * callGraphNode
virtual bool isPointer() const
Check if this variable represents a pointer.
const std::string getValueName() const
Return name of a LLVM value.
RetValPN(NodeID i)
Constructor to create empty RetValPN (for SVFIRReader/deserialization)
virtual const std::string toString() const
Get string representation.
virtual const FunObjVar * getFunction() const
Get containing function, or null for globals/constants.
static SVFIR * getPAG(bool buildFromFile=false)
Singleton design here to make sure we only have one instance during any analysis.
NodeID getId() const
Get ID.
virtual const SVFType * getType() const
virtual const std::string & getName() const
const std::string valueOnlyToString() const
const SVFType * type
SVF type.
virtual bool isConstDataOrAggDataButNotNullPtr() const
Check if this variable represents constant data/metadata but not null pointer.
SVFVar(NodeID i, PNODEK k)
Empty constructor for deserialization.
virtual bool ptrInUncalledFunction() const
Check if this pointer is in an uncalled function.
virtual const FunObjVar * getFunction() const
Get containing function, or null for globals/constants.
void dump() const
Debug dump to console.
virtual bool isIsolatedNode() const
Check if this node is isolated (no edges) in the SVFIR graph.
virtual const std::string toString() const
Get string representation.
virtual const std::string toString() const
Get string representation.
virtual const std::string toString() const
Get string representation.
virtual const FunObjVar * getFunction() const
Get containing function, or null for globals/constants.
const ICFGNode * icfgNode
virtual const std::string toString() const
Get string representation.
const FunObjVar * callGraphNode
const std::string getValueName() const
Return name of a LLVM value.
virtual const FunObjVar * getFunction() const
Get containing function, or null for globals/constants.
std::ostream & outs()
Overwrite llvm::outs()
llvm::IRBuilder IRBuilder