Static Value-Flow Analysis
Loading...
Searching...
No Matches
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

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
 
 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.
 
const std::string & getName () 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.
 

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
 
void setCalledOperand (const SVFValue *v)
 
- Protected Member Functions inherited from SVF::SVFValue
 SVFValue (const SVFType *ty, SVFValKind k)
 Constructor without name.
 
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.
 
std::string name
 Short name of value for printing & debugging.
 
std::string sourceLoc
 

Detailed Description

Definition at line 675 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 700 of file SVFValue.h.

700 :
701 SVFInstruction(ty, b, tm, false, k), varArg(va), calledVal(nullptr)
702 {
703 }
const cJSON *const b
Definition cJSON.h:255
const SVFValue * calledVal
Definition SVFValue.h:685
SVFInstruction(void)=delete
llvm::IRBuilder IRBuilder
Definition BasicTypes.h:74

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

690 {
691 args.push_back(a);
692 }
cJSON * a
Definition cJSON.cpp:2560
std::vector< const SVFValue * > args
Definition SVFValue.h:683

◆ arg_empty()

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

Definition at line 718 of file SVFValue.h.

719 {
720 return args.empty();
721 }

◆ arg_size()

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

Definition at line 714 of file SVFValue.h.

715 {
716 return args.size();
717 }

◆ classof() [1/2]

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

Definition at line 710 of file SVFValue.h.

711 {
712 return node->getKind() == SVFCall || node->getKind() == SVFVCall;
713 }

◆ classof() [2/2]

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

Definition at line 706 of file SVFValue.h.

707 {
708 return node->getKind() == SVFCall || node->getKind() == SVFVCall;
709 }

◆ getArgOperand()

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

Definition at line 722 of file SVFValue.h.

723 {
724 assert(i < arg_size() && "out of bound access of the argument");
725 return args[i];
726 }
u32_t arg_size() const
Definition SVFValue.h:714

◆ getCalledFunction()

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

Definition at line 739 of file SVFValue.h.

740 {
741 return SVFUtil::dyn_cast<SVFFunction>(calledVal);
742 }

◆ getCalledOperand()

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

Definition at line 731 of file SVFValue.h.

732 {
733 return calledVal;
734 }

◆ getCaller()

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

Definition at line 743 of file SVFValue.h.

744 {
745 return getFunction();
746 }
const SVFFunction * getFunction() const
Definition SVFValue.h:664

◆ getNumArgOperands()

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

Definition at line 727 of file SVFValue.h.

728 {
729 return arg_size();
730 }

◆ isVarArg()

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

Definition at line 735 of file SVFValue.h.

736 {
737 return varArg;
738 }

◆ setCalledOperand()

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

Definition at line 693 of file SVFValue.h.

694 {
695 calledVal = v;
696 }

Friends And Related Symbol Documentation

◆ LLVMModuleSet

Definition at line 679 of file SVFValue.h.

◆ SVFIRBuilder

Definition at line 680 of file SVFValue.h.

◆ SVFIRReader

Definition at line 678 of file SVFValue.h.

◆ SVFIRWriter

Definition at line 677 of file SVFValue.h.

Member Data Documentation

◆ args

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

Definition at line 683 of file SVFValue.h.

◆ calledVal

const SVFValue* SVF::SVFCallInst::calledVal
private

Definition at line 685 of file SVFValue.h.

◆ varArg

bool SVF::SVFCallInst::varArg
private

Definition at line 684 of file SVFValue.h.


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