Static Value-Flow Analysis
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Private Attributes | Friends | List of all members
SVF::SVFFunctionType Class Reference

#include <SVFType.h>

Inheritance diagram for SVF::SVFFunctionType:
SVF::SVFType

Public Member Functions

 SVFFunctionType (u32_t i, const SVFType *rt, const std::vector< const SVFType * > &p, bool isvararg)
 
const SVFTypegetReturnType () const
 
const std::vector< const SVFType * > & getParamTypes () const
 
bool isVarArg () const
 
void print (std::ostream &os) const override
 
- Public Member Functions inherited from SVF::SVFType
 SVFType (void)=delete
 
virtual ~SVFType ()
 
GNodeK getKind () const
 
std::string toString () const
 
u32_t getId () const
 
void setTypeInfo (StInfo *ti)
 
StInfogetTypeInfo ()
 
const StInfogetTypeInfo () const
 
u32_t getByteSize () const
 
bool isPointerTy () const
 
bool isArrayTy () const
 
bool isStructTy () const
 
bool isSingleValueType () const
 

Static Public Member Functions

static bool classof (const SVFType *node)
 
- Static Public Member Functions inherited from SVF::SVFType
static SVFTypegetSVFPtrType ()
 
static SVFTypegetSVFInt8Type ()
 

Private Attributes

const SVFTyperetTy
 
std::vector< const SVFType * > params
 
bool varArg
 

Friends

class SVFIRWriter
 
class SVFIRReader
 

Additional Inherited Members

- Public Types inherited from SVF::SVFType
enum  SVFTyKind {
  SVFTy , SVFPointerTy , SVFIntegerTy , SVFFunctionTy ,
  SVFStructTy , SVFArrayTy , SVFOtherTy
}
 
typedef s64_t GNodeK
 
- Protected Member Functions inherited from SVF::SVFType
 SVFType (bool svt, SVFTyKind k, u32_t i=0, u32_t Sz=1)
 

Detailed Description

Definition at line 324 of file SVFType.h.

Constructor & Destructor Documentation

◆ SVFFunctionType()

SVF::SVFFunctionType::SVFFunctionType ( u32_t  i,
const SVFType rt,
const std::vector< const SVFType * > &  p,
bool  isvararg 
)
inline

Definition at line 335 of file SVFType.h.

336 : SVFType(false, SVFFunctionTy, i, 1), retTy(rt), params(p), varArg(isvararg)
337 {
338 }
cJSON * p
Definition cJSON.cpp:2559
const SVFType * retTy
Definition SVFType.h:330
std::vector< const SVFType * > params
Definition SVFType.h:331
SVFType(void)=delete
llvm::IRBuilder IRBuilder
Definition BasicTypes.h:74

Member Function Documentation

◆ classof()

static bool SVF::SVFFunctionType::classof ( const SVFType node)
inlinestatic

Definition at line 340 of file SVFType.h.

341 {
342 return node->getKind() == SVFFunctionTy;
343 }

◆ getParamTypes()

const std::vector< const SVFType * > & SVF::SVFFunctionType::getParamTypes ( ) const
inline

Definition at line 349 of file SVFType.h.

350 {
351 return params;
352 }

◆ getReturnType()

const SVFType * SVF::SVFFunctionType::getReturnType ( ) const
inline

Definition at line 344 of file SVFType.h.

345 {
346 return retTy;
347 }

◆ isVarArg()

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

Definition at line 355 of file SVFType.h.

356 {
357 return varArg;
358 }

◆ print()

void SVF::SVFFunctionType::print ( std::ostream &  os) const
overridevirtual

Implements SVF::SVFType.

Definition at line 37 of file SVFType.cpp.

38{
39 os << *getReturnType() << "(";
40
41 // Print parameters
42 for (size_t i = 0; i < params.size(); ++i)
43 {
44 os << *params[i];
45 // Add comma after all params except the last one
46 if (i != params.size() - 1)
47 {
48 os << ", ";
49 }
50 }
51
52 // Add varargs indicator if needed
53 if (isVarArg())
54 {
55 if (!params.empty())
56 {
57 os << ", ";
58 }
59 os << "...";
60 }
61
62 os << ")";
63}
const SVFType * getReturnType() const
Definition SVFType.h:344
bool isVarArg() const
Definition SVFType.h:355

Friends And Related Symbol Documentation

◆ SVFIRReader

friend class SVFIRReader
friend

Definition at line 327 of file SVFType.h.

◆ SVFIRWriter

friend class SVFIRWriter
friend

Definition at line 326 of file SVFType.h.

Member Data Documentation

◆ params

std::vector<const SVFType*> SVF::SVFFunctionType::params
private

Definition at line 331 of file SVFType.h.

◆ retTy

const SVFType* SVF::SVFFunctionType::retTy
private

Definition at line 330 of file SVFType.h.

◆ varArg

bool SVF::SVFFunctionType::varArg
private

Definition at line 332 of file SVFType.h.


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