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

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
 
 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)
 

Private Attributes

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

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.
 
void setConstDataOrAggData ()
 
void setPtrInUncalledFunction ()
 
- 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 636 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:644
bool terminator
The BasicBlock where this Instruction resides.
Definition SVFValue.h:643
const SVFBasicBlock * bb
Definition SVFValue.h:642
SVFValue()=delete
llvm::IRBuilder IRBuilder
Definition BasicTypes.h:74

◆ SVFInstruction() [2/2]

SVF::SVFInstruction::SVFInstruction ( void  )
delete

Member Function Documentation

◆ classof()

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

Definition at line 652 of file SVFValue.h.

653 {
654 return node->getKind() == SVFInst ||
655 node->getKind() == SVFCall ||
656 node->getKind() == SVFVCall;
657 }

◆ getFunction()

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

Definition at line 664 of file SVFValue.h.

665 {
666 return bb->getParent();
667 }
const SVFFunction * getParent() const
Definition SVFValue.h:595

◆ getParent()

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

Definition at line 659 of file SVFValue.h.

660 {
661 return bb;
662 }

◆ isRetInst()

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

Definition at line 669 of file SVFValue.h.

670 {
671 return ret;
672 }

Friends And Related Symbol Documentation

◆ SVFIRReader

Definition at line 639 of file SVFValue.h.

◆ SVFIRWriter

Definition at line 638 of file SVFValue.h.

Member Data Documentation

◆ bb

const SVFBasicBlock* SVF::SVFInstruction::bb
private

Definition at line 642 of file SVFValue.h.

◆ ret

bool SVF::SVFInstruction::ret
private

return true if this is a terminator instruction

Definition at line 644 of file SVFValue.h.

◆ terminator

bool SVF::SVFInstruction::terminator
private

The BasicBlock where this Instruction resides.

Definition at line 643 of file SVFValue.h.


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