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

#include <SVFValue.h>

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

Public Member Functions

 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)
 

Private Attributes

const SVFBasicBlockbb
 
bool terminator
 The BasicBlock where this Instruction resides. More...
 
bool ret
 return true if this is a terminator instruction More...
 

Friends

class SVFIRWriter
 
class SVFIRReader
 

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 Member Functions inherited from SVF::SVFValue
 SVFValue (const SVFType *ty, SVFValKind k)
 Constructor without name. More...
 
void setConstDataOrAggData ()
 
void setPtrInUncalledFunction ()
 
- 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 625 of file SVFValue.h.

Constructor & Destructor Documentation

◆ SVFInstruction() [1/2]

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

Constructor without name, set name with setName()

Definition at line 266 of file SVFValue.cpp.

268  : SVFValue(ty, k), bb(b), terminator(tm), ret(isRet)
269 {
270 }
const cJSON *const b
Definition: cJSON.h:255
bool ret
return true if this is a terminator instruction
Definition: SVFValue.h:633
bool terminator
The BasicBlock where this Instruction resides.
Definition: SVFValue.h:632
const SVFBasicBlock * bb
Definition: SVFValue.h:631
SVFValue()=delete

◆ SVFInstruction() [2/2]

SVF::SVFInstruction::SVFInstruction ( void  )
delete

Member Function Documentation

◆ classof()

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

Definition at line 641 of file SVFValue.h.

642  {
643  return node->getKind() == SVFInst ||
644  node->getKind() == SVFCall ||
645  node->getKind() == SVFVCall;
646  }

◆ getFunction()

const SVFFunction* SVF::SVFInstruction::getFunction ( ) const
inline

Definition at line 653 of file SVFValue.h.

654  {
655  return bb->getParent();
656  }
const SVFFunction * getParent() const
Definition: SVFValue.h:584

◆ getParent()

const SVFBasicBlock* SVF::SVFInstruction::getParent ( ) const
inline

Definition at line 648 of file SVFValue.h.

649  {
650  return bb;
651  }

◆ isRetInst()

bool SVF::SVFInstruction::isRetInst ( ) const
inline

Definition at line 658 of file SVFValue.h.

659  {
660  return ret;
661  }

Friends And Related Function Documentation

◆ SVFIRReader

friend class SVFIRReader
friend

Definition at line 628 of file SVFValue.h.

◆ SVFIRWriter

friend class SVFIRWriter
friend

Definition at line 627 of file SVFValue.h.

Member Data Documentation

◆ bb

const SVFBasicBlock* SVF::SVFInstruction::bb
private

Definition at line 631 of file SVFValue.h.

◆ ret

bool SVF::SVFInstruction::ret
private

return true if this is a terminator instruction

Definition at line 633 of file SVFValue.h.

◆ terminator

bool SVF::SVFInstruction::terminator
private

The BasicBlock where this Instruction resides.

Definition at line 632 of file SVFValue.h.


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