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

#include <SVFType.h>

Inheritance diagram for SVF::SVFStructType:
SVF::SVFType

Public Member Functions

 SVFStructType (u32_t i, std::vector< const SVFType * > &f, u32_t byteSize=1)
 
void print (std::ostream &os) const override
 
const std::string & getName ()
 
void setName (const std::string &structName)
 
void setName (std::string &&structName)
 
const std::vector< const SVFType * > & getFieldTypes () const
 
- 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

std::string name
 Field for printing & debugging.
 
std::vector< const SVFType * > fields
 

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 363 of file SVFType.h.

Constructor & Destructor Documentation

◆ SVFStructType()

SVF::SVFStructType::SVFStructType ( u32_t  i,
std::vector< const SVFType * > &  f,
u32_t  byteSize = 1 
)
inline

Definition at line 374 of file SVFType.h.

374 :
376 {
377 }
std::vector< const SVFType * > fields
Definition SVFType.h:371
u32_t byteSize
LLVM Byte Size.
Definition SVFType.h:199
SVFType(void)=delete
llvm::IRBuilder IRBuilder
Definition BasicTypes.h:74

Member Function Documentation

◆ classof()

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

Definition at line 379 of file SVFType.h.

380 {
381 return node->getKind() == SVFStructTy;
382 }

◆ getFieldTypes()

const std::vector< const SVFType * > & SVF::SVFStructType::getFieldTypes ( ) const
inline

Definition at line 399 of file SVFType.h.

400 {
401 return fields;
402 }

◆ getName()

const std::string & SVF::SVFStructType::getName ( )
inline

Definition at line 386 of file SVFType.h.

387 {
388 return name;
389 }
std::string name
Field for printing & debugging.
Definition SVFType.h:370

◆ print()

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

Implements SVF::SVFType.

Definition at line 65 of file SVFType.cpp.

66{
67 os << "S." << name << " {";
68
69 // Print fields
70 for (size_t i = 0; i < fields.size(); ++i)
71 {
72 os << *fields[i];
73 // Add comma after all fields except the last one
74 if (i != fields.size() - 1)
75 {
76 os << ", ";
77 }
78 }
79 os << "}";
80}

◆ setName() [1/2]

void SVF::SVFStructType::setName ( const std::string &  structName)
inline

Definition at line 390 of file SVFType.h.

391 {
393 }
const std::string structName
Definition CppUtil.cpp:56

◆ setName() [2/2]

void SVF::SVFStructType::setName ( std::string &&  structName)
inline

Definition at line 394 of file SVFType.h.

395 {
396 name = std::move(structName);
397 }

Friends And Related Symbol Documentation

◆ SVFIRReader

friend class SVFIRReader
friend

Definition at line 366 of file SVFType.h.

◆ SVFIRWriter

friend class SVFIRWriter
friend

Definition at line 365 of file SVFType.h.

Member Data Documentation

◆ fields

std::vector<const SVFType*> SVF::SVFStructType::fields
private

Definition at line 371 of file SVFType.h.

◆ name

std::string SVF::SVFStructType::name
private

Field for printing & debugging.

Definition at line 370 of file SVFType.h.


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