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

#include <SVFValue.h>

Public Member Functions

 CallSite (const SVFInstruction *I)
 
const SVFInstructiongetInstruction () const
 
const SVFValuegetArgument (u32_t ArgNo) const
 
const SVFTypegetType () const
 
u32_t arg_size () const
 
bool arg_empty () const
 
const SVFValuegetArgOperand (u32_t i) const
 
u32_t getNumArgOperands () const
 
const SVFFunctiongetCalledFunction () const
 
const SVFValuegetCalledValue () const
 
const SVFFunctiongetCaller () const
 
bool isVarArg () const
 
bool isVirtualCall () const
 
const SVFValuegetVtablePtr () const
 
s32_t getFunIdxInVtable () const
 
const std::stringgetFunNameOfVirtualCall () const
 
bool operator== (const CallSite &CS) const
 
bool operator!= (const CallSite &CS) const
 
bool operator< (const CallSite &CS) const
 

Private Member Functions

 CallSite ()
 Constructs empty CallSite (for SVFIRReader/deserialization) More...
 

Private Attributes

const SVFCallInstCB
 

Friends

class SVFIRReader
 

Detailed Description

Definition at line 1118 of file SVFValue.h.

Constructor & Destructor Documentation

◆ CallSite() [1/2]

SVF::CallSite::CallSite ( )
inlineprivate

Constructs empty CallSite (for SVFIRReader/deserialization)

Definition at line 1126 of file SVFValue.h.

1126 : CB{} {}
const SVFCallInst * CB
Definition: SVFValue.h:1123

◆ CallSite() [2/2]

SVF::CallSite::CallSite ( const SVFInstruction I)
inline

Definition at line 1129 of file SVFValue.h.

1129  : CB(SVFUtil::dyn_cast<SVFCallInst>(I))
1130  {
1131  assert(CB && "not a callsite?");
1132  }

Member Function Documentation

◆ arg_empty()

bool SVF::CallSite::arg_empty ( ) const
inline

Definition at line 1149 of file SVFValue.h.

1150  {
1151  return CB->arg_empty();
1152  }
bool arg_empty() const
Definition: SVFValue.h:747

◆ arg_size()

u32_t SVF::CallSite::arg_size ( ) const
inline

Definition at line 1145 of file SVFValue.h.

1146  {
1147  return CB->arg_size();
1148  }
u32_t arg_size() const
Definition: SVFValue.h:743

◆ getArgOperand()

const SVFValue* SVF::CallSite::getArgOperand ( u32_t  i) const
inline

Definition at line 1153 of file SVFValue.h.

1154  {
1155  return CB->getArgOperand(i);
1156  }
const SVFValue * getArgOperand(u32_t i) const
Definition: SVFValue.h:751

◆ getArgument()

const SVFValue* SVF::CallSite::getArgument ( u32_t  ArgNo) const
inline

Definition at line 1137 of file SVFValue.h.

1138  {
1139  return CB->getArgOperand(ArgNo);
1140  }

◆ getCalledFunction()

const SVFFunction* SVF::CallSite::getCalledFunction ( ) const
inline

Definition at line 1161 of file SVFValue.h.

1162  {
1163  return CB->getCalledFunction();
1164  }
const SVFFunction * getCalledFunction() const
Definition: SVFValue.h:768

◆ getCalledValue()

const SVFValue* SVF::CallSite::getCalledValue ( ) const
inline

Definition at line 1165 of file SVFValue.h.

1166  {
1167  return CB->getCalledOperand();
1168  }
const SVFValue * getCalledOperand() const
Definition: SVFValue.h:760

◆ getCaller()

const SVFFunction* SVF::CallSite::getCaller ( ) const
inline

Definition at line 1169 of file SVFValue.h.

1170  {
1171  return CB->getCaller();
1172  }
const SVFFunction * getCaller() const
Definition: SVFValue.h:772

◆ getFunIdxInVtable()

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

Definition at line 1186 of file SVFValue.h.

1187  {
1188  assert(isVirtualCall() && "not a virtual call?");
1189  return SVFUtil::cast<SVFVirtualCallInst>(CB)->getFunIdxInVtable();
1190  }
bool isVirtualCall() const
Definition: SVFValue.h:1177

◆ getFunNameOfVirtualCall()

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

Definition at line 1191 of file SVFValue.h.

1192  {
1193  assert(isVirtualCall() && "not a virtual call?");
1194  return SVFUtil::cast<SVFVirtualCallInst>(CB)->getFunNameOfVirtualCall();
1195  }

◆ getInstruction()

const SVFInstruction* SVF::CallSite::getInstruction ( ) const
inline

Definition at line 1133 of file SVFValue.h.

1134  {
1135  return CB;
1136  }

◆ getNumArgOperands()

u32_t SVF::CallSite::getNumArgOperands ( ) const
inline

Definition at line 1157 of file SVFValue.h.

1158  {
1159  return CB->arg_size();
1160  }

◆ getType()

const SVFType* SVF::CallSite::getType ( void  ) const
inline

Definition at line 1141 of file SVFValue.h.

1142  {
1143  return CB->getType();
1144  }
virtual const SVFType * getType() const
Definition: SVFValue.h:256

◆ getVtablePtr()

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

Definition at line 1181 of file SVFValue.h.

1182  {
1183  assert(isVirtualCall() && "not a virtual call?");
1184  return SVFUtil::cast<SVFVirtualCallInst>(CB)->getVtablePtr();
1185  }

◆ isVarArg()

bool SVF::CallSite::isVarArg ( ) const
inline

Definition at line 1173 of file SVFValue.h.

1174  {
1175  return CB->isVarArg();
1176  }
bool isVarArg() const
Definition: SVFValue.h:764

◆ isVirtualCall()

bool SVF::CallSite::isVirtualCall ( ) const
inline

Definition at line 1177 of file SVFValue.h.

1178  {
1179  return SVFUtil::isa<SVFVirtualCallInst>(CB);
1180  }

◆ operator!=()

bool SVF::CallSite::operator!= ( const CallSite CS) const
inline

Definition at line 1200 of file SVFValue.h.

1201  {
1202  return CB != CS.CB;
1203  }

◆ operator<()

bool SVF::CallSite::operator< ( const CallSite CS) const
inline

Definition at line 1204 of file SVFValue.h.

1205  {
1206  return getInstruction() < CS.getInstruction();
1207  }
const SVFInstruction * getInstruction() const
Definition: SVFValue.h:1133

◆ operator==()

bool SVF::CallSite::operator== ( const CallSite CS) const
inline

Definition at line 1196 of file SVFValue.h.

1197  {
1198  return CB == CS.CB;
1199  }

Friends And Related Function Documentation

◆ SVFIRReader

friend class SVFIRReader
friend

Definition at line 1120 of file SVFValue.h.

Member Data Documentation

◆ CB

const SVFCallInst* SVF::CallSite::CB
private

Definition at line 1123 of file SVFValue.h.


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