Static Value-Flow Analysis
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Attributes | Friends | List of all members
SVF::SVFVirtualCallInst Class Reference

#include <SVFValue.h>

Inheritance diagram for SVF::SVFVirtualCallInst:
SVF::SVFCallInst SVF::SVFInstruction SVF::SVFValue

Public Member Functions

 SVFVirtualCallInst (const SVFType *ty, const SVFBasicBlock *b, bool vararg, bool tm)
 
const SVFValuegetVtablePtr () const
 
s32_t getFunIdxInVtable () const
 
const std::stringgetFunNameOfVirtualCall () const
 
- Public Member Functions inherited from SVF::SVFCallInst
 SVFCallInst (const SVFType *ty, const SVFBasicBlock *b, bool va, bool tm, SVFValKind k=SVFCall)
 
 SVFCallInst (void)=delete
 
u32_t arg_size () const
 
bool arg_empty () const
 
const SVFValuegetArgOperand (u32_t i) const
 
u32_t getNumArgOperands () const
 
const SVFValuegetCalledOperand () const
 
bool isVarArg () const
 
const SVFFunctiongetCalledFunction () const
 
const SVFFunctiongetCaller () const
 
- Public Member Functions inherited from SVF::SVFInstruction
 SVFInstruction (const SVFType *ty, const SVFBasicBlock *b, bool tm, bool isRet, SVFValKind k=SVFInst)
 return true if this is an return instruction of a function More...
 
 SVFInstruction (void)=delete
 
const SVFBasicBlockgetParent () const
 
const SVFFunctiongetFunction () const
 
bool isRetInst () const
 
- Public Member Functions inherited from SVF::SVFValue
 SVFValue ()=delete
 
virtual ~SVFValue ()=default
 
GNodeK getKind () const
 Get the type of this SVFValue. More...
 
const std::stringgetName () const
 
void setName (const std::string &n)
 
void setName (std::string &&n)
 
virtual const SVFTypegetType () const
 
bool isConstDataOrAggData () const
 
bool ptrInUncalledFunction () const
 
bool isblackHole () const
 
bool isNullPtr () const
 
virtual void setSourceLoc (const std::string &sourceCodeInfo)
 
virtual const std::string getSourceLoc () const
 
std::string toString () const
 Needs to be implemented by a SVF front end. More...
 

Static Public Member Functions

static bool classof (const SVFValue *node)
 
static bool classof (const SVFInstruction *node)
 
static bool classof (const SVFCallInst *node)
 
- Static Public Member Functions inherited from SVF::SVFCallInst
static bool classof (const SVFValue *node)
 
static bool classof (const SVFInstruction *node)
 
- Static Public Member Functions inherited from SVF::SVFInstruction
static bool classof (const SVFValue *node)
 

Protected Member Functions

void setFunIdxInVtable (s32_t idx)
 the function name of this virtual call More...
 
void setFunNameOfVirtualCall (const std::string &name)
 
void setVtablePtr (const SVFValue *vptr)
 
- Protected Member Functions inherited from SVF::SVFCallInst
void addArgument (const SVFValue *a)
 attributes to be set only through Module builders e.g., LLVMModule More...
 
void setCalledOperand (const SVFValue *v)
 
- Protected Member Functions inherited from SVF::SVFValue
 SVFValue (const SVFType *ty, SVFValKind k)
 Constructor without name. More...
 
void setConstDataOrAggData ()
 
void setPtrInUncalledFunction ()
 

Private Attributes

const SVFValuevCallVtblPtr
 
s32_t virtualFunIdx
 virtual table pointer More...
 
std::string funNameOfVcall
 virtual function index of the virtual table(s) at a virtual call More...
 

Friends

class SVFIRWriter
 
class SVFIRReader
 
class LLVMModuleSet
 

Additional Inherited Members

- Public Types inherited from SVF::SVFValue
enum  SVFValKind {
  SVFVal , SVFFunc , SVFBB , SVFInst ,
  SVFCall , SVFVCall , SVFGlob , SVFArg ,
  SVFConst , SVFConstData , SVFConstInt , SVFConstFP ,
  SVFNullPtr , SVFBlackHole , SVFMetaAsValue , SVFOther
}
 
typedef s64_t GNodeK
 
- Protected Attributes inherited from SVF::SVFValue
const SVFTypetype
 Type of this SVFValue. More...
 
std::string name
 Short name of value for printing & debugging. More...
 
std::string sourceLoc
 

Detailed Description

Definition at line 738 of file SVFValue.h.

Constructor & Destructor Documentation

◆ SVFVirtualCallInst()

SVF::SVFVirtualCallInst::SVFVirtualCallInst ( const SVFType ty,
const SVFBasicBlock b,
bool  vararg,
bool  tm 
)
inline

Definition at line 764 of file SVFValue.h.

766  : SVFCallInst(ty, b, vararg, tm, SVFVCall), vCallVtblPtr(nullptr),
768  {
769  }
const cJSON *const b
Definition: cJSON.h:255
SVFCallInst(void)=delete
std::string funNameOfVcall
virtual function index of the virtual table(s) at a virtual call
Definition: SVFValue.h:747
const SVFValue * vCallVtblPtr
Definition: SVFValue.h:745
s32_t virtualFunIdx
virtual table pointer
Definition: SVFValue.h:746

Member Function Documentation

◆ classof() [1/3]

static bool SVF::SVFVirtualCallInst::classof ( const SVFCallInst node)
inlinestatic

Definition at line 792 of file SVFValue.h.

793  {
794  return node->getKind() == SVFVCall;
795  }

◆ classof() [2/3]

static bool SVF::SVFVirtualCallInst::classof ( const SVFInstruction node)
inlinestatic

Definition at line 788 of file SVFValue.h.

789  {
790  return node->getKind() == SVFVCall;
791  }

◆ classof() [3/3]

static bool SVF::SVFVirtualCallInst::classof ( const SVFValue node)
inlinestatic

Definition at line 784 of file SVFValue.h.

785  {
786  return node->getKind() == SVFVCall;
787  }

◆ getFunIdxInVtable()

s32_t SVF::SVFVirtualCallInst::getFunIdxInVtable ( ) const
inline

Definition at line 775 of file SVFValue.h.

776  {
777  assert(virtualFunIdx >=0 && "virtual function idx is less than 0? not set yet?");
778  return virtualFunIdx;
779  }

◆ getFunNameOfVirtualCall()

const std::string& SVF::SVFVirtualCallInst::getFunNameOfVirtualCall ( ) const
inline

Definition at line 780 of file SVFValue.h.

781  {
782  return funNameOfVcall;
783  }

◆ getVtablePtr()

const SVFValue* SVF::SVFVirtualCallInst::getVtablePtr ( ) const
inline

Definition at line 770 of file SVFValue.h.

771  {
772  assert(vCallVtblPtr && "virtual call does not have a vtblptr? set it first");
773  return vCallVtblPtr;
774  }

◆ setFunIdxInVtable()

void SVF::SVFVirtualCallInst::setFunIdxInVtable ( s32_t  idx)
inlineprotected

the function name of this virtual call

Definition at line 750 of file SVFValue.h.

751  {
752  virtualFunIdx = idx;
753  }

◆ setFunNameOfVirtualCall()

void SVF::SVFVirtualCallInst::setFunNameOfVirtualCall ( const std::string name)
inlineprotected

Definition at line 754 of file SVFValue.h.

755  {
757  }
std::string name
Short name of value for printing & debugging.
Definition: SVFValue.h:213

◆ setVtablePtr()

void SVF::SVFVirtualCallInst::setVtablePtr ( const SVFValue vptr)
inlineprotected

Definition at line 758 of file SVFValue.h.

759  {
760  vCallVtblPtr = vptr;
761  }

Friends And Related Function Documentation

◆ LLVMModuleSet

friend class LLVMModuleSet
friend

Definition at line 742 of file SVFValue.h.

◆ SVFIRReader

friend class SVFIRReader
friend

Definition at line 741 of file SVFValue.h.

◆ SVFIRWriter

friend class SVFIRWriter
friend

Definition at line 740 of file SVFValue.h.

Member Data Documentation

◆ funNameOfVcall

std::string SVF::SVFVirtualCallInst::funNameOfVcall
private

virtual function index of the virtual table(s) at a virtual call

Definition at line 747 of file SVFValue.h.

◆ vCallVtblPtr

const SVFValue* SVF::SVFVirtualCallInst::vCallVtblPtr
private

Definition at line 745 of file SVFValue.h.

◆ virtualFunIdx

s32_t SVF::SVFVirtualCallInst::virtualFunIdx
private

virtual table pointer

Definition at line 746 of file SVFValue.h.


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