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

#include <SVFValue.h>

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

Public Member Functions

 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 Public Member Functions inherited from SVF::SVFInstruction
static bool classof (const SVFValue *node)
 

Protected Member Functions

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

std::vector< const SVFValue * > args
 
bool varArg
 
const SVFValuecalledVal
 

Friends

class SVFIRWriter
 
class SVFIRReader
 
class LLVMModuleSet
 
class SVFIRBuilder
 

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 664 of file SVFValue.h.

Constructor & Destructor Documentation

◆ SVFCallInst() [1/2]

SVF::SVFCallInst::SVFCallInst ( const SVFType ty,
const SVFBasicBlock b,
bool  va,
bool  tm,
SVFValKind  k = SVFCall 
)
inline

Definition at line 689 of file SVFValue.h.

689  :
690  SVFInstruction(ty, b, tm, false, k), varArg(va), calledVal(nullptr)
691  {
692  }
const cJSON *const b
Definition: cJSON.h:255
const SVFValue * calledVal
Definition: SVFValue.h:674
SVFInstruction(void)=delete

◆ SVFCallInst() [2/2]

SVF::SVFCallInst::SVFCallInst ( void  )
delete

Member Function Documentation

◆ addArgument()

void SVF::SVFCallInst::addArgument ( const SVFValue a)
inlineprotected

attributes to be set only through Module builders e.g., LLVMModule

Definition at line 678 of file SVFValue.h.

679  {
680  args.push_back(a);
681  }
cJSON * a
Definition: cJSON.cpp:2560
std::vector< const SVFValue * > args
Definition: SVFValue.h:672

◆ arg_empty()

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

Definition at line 707 of file SVFValue.h.

708  {
709  return args.empty();
710  }

◆ arg_size()

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

Definition at line 703 of file SVFValue.h.

704  {
705  return args.size();
706  }

◆ classof() [1/2]

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

Definition at line 699 of file SVFValue.h.

700  {
701  return node->getKind() == SVFCall || node->getKind() == SVFVCall;
702  }

◆ classof() [2/2]

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

Definition at line 695 of file SVFValue.h.

696  {
697  return node->getKind() == SVFCall || node->getKind() == SVFVCall;
698  }

◆ getArgOperand()

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

Definition at line 711 of file SVFValue.h.

712  {
713  assert(i < arg_size() && "out of bound access of the argument");
714  return args[i];
715  }
u32_t arg_size() const
Definition: SVFValue.h:703

◆ getCalledFunction()

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

Definition at line 728 of file SVFValue.h.

729  {
730  return SVFUtil::dyn_cast<SVFFunction>(calledVal);
731  }

◆ getCalledOperand()

const SVFValue* SVF::SVFCallInst::getCalledOperand ( ) const
inline

Definition at line 720 of file SVFValue.h.

721  {
722  return calledVal;
723  }

◆ getCaller()

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

Definition at line 732 of file SVFValue.h.

733  {
734  return getFunction();
735  }
const SVFFunction * getFunction() const
Definition: SVFValue.h:653

◆ getNumArgOperands()

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

Definition at line 716 of file SVFValue.h.

717  {
718  return arg_size();
719  }

◆ isVarArg()

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

Definition at line 724 of file SVFValue.h.

725  {
726  return varArg;
727  }

◆ setCalledOperand()

void SVF::SVFCallInst::setCalledOperand ( const SVFValue v)
inlineprotected

Definition at line 682 of file SVFValue.h.

683  {
684  calledVal = v;
685  }

Friends And Related Function Documentation

◆ LLVMModuleSet

friend class LLVMModuleSet
friend

Definition at line 668 of file SVFValue.h.

◆ SVFIRBuilder

friend class SVFIRBuilder
friend

Definition at line 669 of file SVFValue.h.

◆ SVFIRReader

friend class SVFIRReader
friend

Definition at line 667 of file SVFValue.h.

◆ SVFIRWriter

friend class SVFIRWriter
friend

Definition at line 666 of file SVFValue.h.

Member Data Documentation

◆ args

std::vector<const SVFValue*> SVF::SVFCallInst::args
private

Definition at line 672 of file SVFValue.h.

◆ calledVal

const SVFValue* SVF::SVFCallInst::calledVal
private

Definition at line 674 of file SVFValue.h.

◆ varArg

bool SVF::SVFCallInst::varArg
private

Definition at line 673 of file SVFValue.h.


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