Static Value-Flow Analysis
Loading...
Searching...
No Matches
SVF::ConstIntValVar Class Reference

#include <SVFVariables.h>

Inheritance diagram for SVF::ConstIntValVar:
SVF::ConstDataValVar SVF::ValVar SVF::SVFVar SVF::GenericNode< SVFVar, SVFStmt > SVF::SVFValue

Public Member Functions

s64_t getSExtValue () const
u64_t getZExtValue () const
 ConstIntValVar (NodeID i, s64_t sv, u64_t zv, const ICFGNode *icn, const SVFType *svfType)
 Constructor.
virtual const std::string toString () const
 Get string representation.
Public Member Functions inherited from SVF::ConstDataValVar
 ConstDataValVar (NodeID i, const ICFGNode *icn, const SVFType *svfType, PNODEK ty=ConstDataValNode)
 Constructor.
virtual bool isConstDataOrAggData () const
 Check if this variable represents constant/aggregate data.
virtual bool isConstDataOrAggDataButNotNullPtr () const
 Check if this variable represents constant data/metadata but not null pointer.
Public Member Functions inherited from SVF::ValVar
 ValVar (NodeID i, const SVFType *svfType, const ICFGNode *node, PNODEK ty=ValNode)
 Constructor.
const std::string getValueName () const
 Return name of a LLVM value.
const ICFGNode * getICFGNode () const
virtual const FunObjVar * getFunction () const
 Get containing function, or null for globals/constants.
std::string getValVarNodeFieldsStmt () const
Public Member Functions inherited from SVF::SVFVar
 SVFVar (NodeID i, const SVFType *svfType, PNODEK k)
 Standard constructor with ID, type and kind.
virtual ~SVFVar ()
 Virtual destructor.
virtual bool isPointer () const
 Check if this variable represents a pointer.
virtual bool isIsolatedNode () const
 Check if this node is isolated (no edges) in the SVFIR graph.
SVFStmt::SVFStmtSetTy & getIncomingEdges (SVFStmt::PEDGEK kind)
 Edge accessors and checkers.
SVFStmt::SVFStmtSetTy & getOutgoingEdges (SVFStmt::PEDGEK kind)
bool hasIncomingEdges (SVFStmt::PEDGEK kind) const
bool hasOutgoingEdges (SVFStmt::PEDGEK kind) const
SVFStmt::SVFStmtSetTy::iterator getIncomingEdgesBegin (SVFStmt::PEDGEK kind) const
 Edge iterators.
SVFStmt::SVFStmtSetTy::iterator getIncomingEdgesEnd (SVFStmt::PEDGEK kind) const
SVFStmt::SVFStmtSetTy::iterator getOutgoingEdgesBegin (SVFStmt::PEDGEK kind) const
SVFStmt::SVFStmtSetTy::iterator getOutgoingEdgesEnd (SVFStmt::PEDGEK kind) const
virtual bool ptrInUncalledFunction () const
 Check if this pointer is in an uncalled function.
void dump () const
 Debug dump to console.
Public Member Functions inherited from SVF::GenericNode< SVFVar, SVFStmt >
 GenericNode (NodeID i, GNodeK k, const SVFType *svfType=nullptr)
 Constructor.
virtual ~GenericNode ()
 Destructor.
bool hasIncomingEdge () const
 Has incoming/outgoing edge set.
bool hasOutgoingEdge () const
iterator OutEdgeBegin ()
 iterators
iterator OutEdgeEnd ()
iterator InEdgeBegin ()
iterator InEdgeEnd ()
const_iterator OutEdgeBegin () const
const_iterator OutEdgeEnd () const
const_iterator InEdgeBegin () const
const_iterator InEdgeEnd () const
virtual iterator directOutEdgeBegin ()
 Iterators used for SCC detection, overwrite it in child class if necessary.
virtual iterator directOutEdgeEnd ()
virtual iterator directInEdgeBegin ()
virtual iterator directInEdgeEnd ()
virtual const_iterator directOutEdgeBegin () const
virtual const_iterator directOutEdgeEnd () const
virtual const_iterator directInEdgeBegin () const
virtual const_iterator directInEdgeEnd () const
bool addIncomingEdge (EdgeType *inEdge)
 Add incoming and outgoing edges.
bool addOutgoingEdge (EdgeType *outEdge)
EdgeType * hasIncomingEdge (EdgeType *edge) const
 Find incoming and outgoing edges.
EdgeType * hasOutgoingEdge (EdgeType *edge) const
const GEdgeSetTy & getOutEdges () const
const GEdgeSetTy & getInEdges () const
u32_t removeIncomingEdge (EdgeType *edge)
u32_t removeOutgoingEdge (EdgeType *edge)
Public Member Functions inherited from SVF::SVFValue
 SVFValue (NodeID i, GNodeK k, const SVFType *ty=nullptr)
NodeID getId () const
 Get ID.
GNodeK getNodeKind () const
 Get node kind.
virtual const SVFType * getType () const
virtual void setName (const std::string &nameInfo)
virtual void setName (std::string &&nameInfo)
virtual const std::string & getName () const
virtual void setSourceLoc (const std::string &sourceCodeInfo)
virtual const std::string getSourceLoc () const
const std::string valueOnlyToString () const
const bool hasLLVMValue () const

Static Public Member Functions

static bool classof (const ConstIntValVar *)
 Methods for support type inquiry through isa, cast, and dyn_cast:
static bool classof (const ConstDataValVar *node)
static bool classof (const ValVar *node)
static bool classof (const SVFVar *node)
static bool classof (const GenericPAGNodeTy *node)
static bool classof (const SVFValue *node)
Static Public Member Functions inherited from SVF::ConstDataValVar
static bool classof (const ConstDataValVar *)
 Methods for support type inquiry through isa, cast, and dyn_cast:
static bool classof (const ValVar *node)
static bool classof (const SVFVar *node)
static bool classof (const GenericPAGNodeTy *node)
static bool classof (const SVFValue *node)
Static Public Member Functions inherited from SVF::ValVar
static bool classof (const ValVar *)
 Methods for support type inquiry through isa, cast, and dyn_cast:
static bool classof (const SVFVar *node)
static bool classof (const GenericPAGNodeTy *node)
static bool classof (const SVFValue *node)
Static Public Member Functions inherited from SVF::SVFVar
static bool classof (const SVFVar *)
 Type checking support for LLVM-style RTTI.
static bool classof (const GenericPAGNodeTy *node)
static bool classof (const SVFValue *node)
Static Public Member Functions inherited from SVF::GenericNode< SVFVar, SVFStmt >
static bool classof (const GenericNode< SVFVar, SVFStmt > *)
static bool classof (const SVFValue *)

Private Attributes

u64_t zval
s64_t sval

Friends

class GraphDBClient

Additional Inherited Members

Public Types inherited from SVF::SVFVar
typedef GNodeK PNODEK
typedef s64_t GEdgeKind
Public Types inherited from SVF::GenericNode< SVFVar, SVFStmt >
typedef SVFVar NodeType
typedef SVFStmt EdgeType
typedef OrderedSet< EdgeType *, typename EdgeType::equalGEdge > GEdgeSetTy
 Edge kind.
typedef GEdgeSetTy::iterator iterator
typedef GEdgeSetTy::const_iterator const_iterator
Public Types inherited from SVF::SVFValue
enum  GNodeK {
  IntraBlock , GlobalBlock , FunEntryBlock , FunExitBlock ,
  FunCallBlock , FunRetBlock , ValNode , ArgValNode ,
  FunValNode , GepValNode , RetValNode , VarargValNode ,
  GlobalValNode , ConstDataValNode , BlackHoleValNode , ConstFPValNode ,
  ConstIntValNode , ConstNullptrValNode , DummyValNode , IntrinsicValNode ,
  AsmPCValNode , ObjNode , GepObjNode , BaseObjNode ,
  FunObjNode , HeapObjNode , StackObjNode , GlobalObjNode ,
  ConstDataObjNode , ConstFPObjNode , ConstIntObjNode , ConstNullptrObjNode ,
  DummyObjNode , Cmp , BinaryOp , UnaryOp ,
  Branch , DummyVProp , NPtr , FRet ,
  ARet , AParm , FParm , Addr ,
  Copy , Gep , Store , Load ,
  TPhi , TIntraPhi , TInterPhi , FPIN ,
  FPOUT , APIN , APOUT , MPhi ,
  MIntraPhi , MInterPhi , CallNodeKd , CDNodeKd ,
  CFLNodeKd , CHNodeKd , ConstraintNodeKd , TCTNodeKd ,
  BasicBlockKd , OtherKd
}
Protected Member Functions inherited from SVF::SVFVar
const SVFStmt::KindToSVFStmtMapTy & getInEdgeKindToSetMap () const
const SVFStmt::KindToSVFStmtMapTy & getOutEdgeKindToSetMap () const
Static Protected Member Functions inherited from SVF::SVFValue
static bool isICFGNodeKinds (GNodeK n)
 Helper functions to check node kinds.
static bool isInterICFGNodeKind (GNodeK n)
static bool isSVFVarKind (GNodeK n)
static bool isValVarKinds (GNodeK n)
static bool isConstantDataValVar (GNodeK n)
static bool isObjVarKinds (GNodeK n)
static bool isBaseObjVarKinds (GNodeK n)
static bool isConstantDataObjVarKinds (GNodeK n)
static bool isVFGNodeKinds (GNodeK n)
static bool isArgumentVFGNodeKinds (GNodeK n)
static bool isStmtVFGNodeKinds (GNodeK n)
static bool isPHIVFGNodeKinds (GNodeK n)
static bool isMRSVFGNodeKinds (GNodeK n)
static bool isMSSAPHISVFGNodeKinds (GNodeK n)
Protected Attributes inherited from SVF::SVFVar
SVFStmt::KindToSVFStmtMapTy InEdgeKindToSetMap
 Maps tracking incoming and outgoing edges by kind.
SVFStmt::KindToSVFStmtMapTy OutEdgeKindToSetMap
Protected Attributes inherited from SVF::SVFValue
NodeID id
 Node ID.
GNodeK nodeKind
 Node kind.
const SVFType * type
 SVF type.
std::string name
std::string sourceLoc
 Source code information of this value.

Detailed Description

Definition at line 1524 of file SVFVariables.h.

Constructor & Destructor Documentation

◆ ConstIntValVar()

SVF::ConstIntValVar::ConstIntValVar ( NodeID i,
s64_t sv,
u64_t zv,
const ICFGNode * icn,
const SVFType * svfType )
inline

Constructor.

Definition at line 1575 of file SVFVariables.h.

1576 : ConstDataValVar(i, icn, svfType, ConstIntValNode), zval(zv), sval(sv)
1577 {
1578
1579 }
ConstDataValVar(NodeID i, const ICFGNode *icn, const SVFType *svfType, PNODEK ty=ConstDataValNode)
Constructor.

Member Function Documentation

◆ classof() [1/6]

bool SVF::ConstIntValVar::classof ( const ConstDataValVar * node)
inlinestatic

Definition at line 1541 of file SVFVariables.h.

1542 {
1543 return node->getNodeKind() == ConstIntValNode;
1544 }

◆ classof() [2/6]

bool SVF::ConstIntValVar::classof ( const ConstIntValVar * )
inlinestatic

Methods for support type inquiry through isa, cast, and dyn_cast:

Definition at line 1537 of file SVFVariables.h.

1538 {
1539 return true;
1540 }

◆ classof() [3/6]

bool SVF::ConstIntValVar::classof ( const GenericPAGNodeTy * node)
inlinestatic

Definition at line 1553 of file SVFVariables.h.

1554 {
1555 return node->getNodeKind() == ConstIntValNode;
1556 }

◆ classof() [4/6]

bool SVF::ConstIntValVar::classof ( const SVFValue * node)
inlinestatic

Definition at line 1557 of file SVFVariables.h.

1558 {
1559 return node->getNodeKind() == ConstIntValNode;
1560 }

◆ classof() [5/6]

bool SVF::ConstIntValVar::classof ( const SVFVar * node)
inlinestatic

Definition at line 1549 of file SVFVariables.h.

1550 {
1551 return node->getNodeKind() == ConstIntValNode;
1552 }

◆ classof() [6/6]

bool SVF::ConstIntValVar::classof ( const ValVar * node)
inlinestatic

Definition at line 1545 of file SVFVariables.h.

1546 {
1547 return node->getNodeKind() == ConstIntValNode;
1548 }

◆ getSExtValue()

s64_t SVF::ConstIntValVar::getSExtValue ( ) const
inline

Definition at line 1563 of file SVFVariables.h.

1564 {
1565 return sval;
1566 }

◆ getZExtValue()

u64_t SVF::ConstIntValVar::getZExtValue ( ) const
inline

Definition at line 1569 of file SVFVariables.h.

1570 {
1571 return zval;
1572 }

◆ toString()

const std::string ConstIntValVar::toString ( ) const
virtual

Get string representation.

Reimplemented from SVF::ConstDataValVar.

Definition at line 367 of file SVFVariables.cpp.

368{
369 std::string str;
370 std::stringstream rawstr(str);
371 rawstr << "ConstIntValVar ID: " << getId();
373 {
374 rawstr << "\n";
375 rawstr << valueOnlyToString();
376 }
377 return rawstr.str();
378}
static const Option< bool > ShowSVFIRValue
Definition Options.h:120
NodeID getId() const
Get ID.
Definition SVFValue.h:158
const std::string valueOnlyToString() const
Definition LLVMUtil.cpp:747

◆ GraphDBClient

friend class GraphDBClient
friend

Definition at line 1527 of file SVFVariables.h.

Member Data Documentation

◆ sval

s64_t SVF::ConstIntValVar::sval
private

Definition at line 1532 of file SVFVariables.h.

◆ zval

u64_t SVF::ConstIntValVar::zval
private

Definition at line 1531 of file SVFVariables.h.


The documentation for this class was generated from the following files: