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

#include <SVFType.h>

Inheritance diagram for SVF::SVFType:
SVF::SVFArrayType SVF::SVFFunctionType SVF::SVFIntegerType SVF::SVFOtherType SVF::SVFPointerType SVF::SVFStructType

Public Types

enum  SVFTyKind {
  SVFTy , SVFPointerTy , SVFIntegerTy , SVFFunctionTy ,
  SVFStructTy , SVFArrayTy , SVFOtherTy
}
 
typedef s64_t GNodeK
 

Public Member Functions

 SVFType (void)=delete
 
virtual ~SVFType ()
 
GNodeK getKind () const
 
std::string toString () const
 
virtual void print (std::ostream &os) const =0
 
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 SVFTypegetSVFPtrType ()
 
static SVFTypegetSVFInt8Type ()
 

Protected Member Functions

 SVFType (bool svt, SVFTyKind k, u32_t i=0, u32_t Sz=1)
 

Private Attributes

GNodeK kind
 used for classof
 
StInfotypeinfo
 SVF's TypeInfo.
 
bool isSingleValTy
 The type represents a single value, not struct or.
 
u32_t byteSize
 LLVM Byte Size.
 
u32_t id
 array
 

Static Private Attributes

static SVFTypesvfPtrTy = nullptr
 ptr type
 
static SVFTypesvfI8Ty = nullptr
 8-bit int type
 

Friends

class LLVMModuleSet
 

Detailed Description

Definition at line 154 of file SVFType.h.

Member Typedef Documentation

◆ GNodeK

Definition at line 160 of file SVFType.h.

Member Enumeration Documentation

◆ SVFTyKind

Enumerator
SVFTy 
SVFPointerTy 
SVFIntegerTy 
SVFFunctionTy 
SVFStructTy 
SVFArrayTy 
SVFOtherTy 

Definition at line 162 of file SVFType.h.

163 {
164 SVFTy,
171 };

Constructor & Destructor Documentation

◆ SVFType() [1/2]

SVF::SVFType::SVFType ( bool  svt,
SVFTyKind  k,
u32_t  i = 0,
u32_t  Sz = 1 
)
inlineprotected

Definition at line 201 of file SVFType.h.

202 : kind(k), typeinfo(nullptr),
204 {
205 }
u32_t id
array
Definition SVFType.h:197
GNodeK kind
used for classof
Definition SVFType.h:193
u32_t byteSize
LLVM Byte Size.
Definition SVFType.h:196
StInfo * typeinfo
SVF's TypeInfo.
Definition SVFType.h:194
bool isSingleValTy
The type represents a single value, not struct or.
Definition SVFType.h:195
llvm::IRBuilder IRBuilder
Definition BasicTypes.h:74

◆ SVFType() [2/2]

SVF::SVFType::SVFType ( void  )
delete

◆ ~SVFType()

virtual SVF::SVFType::~SVFType ( )
inlinevirtual

Definition at line 208 of file SVFType.h.

208{}

Member Function Documentation

◆ getByteSize()

u32_t SVF::SVFType::getByteSize ( ) const
inline

if Type is not sized, byteSize is 0 if Type is sized, byteSize is the LLVM Byte Size.

Definition at line 246 of file SVFType.h.

247 {
248 return byteSize;
249 }

◆ getId()

u32_t SVF::SVFType::getId ( ) const
inline

Definition at line 222 of file SVFType.h.

223 {
224 return id;
225 }

◆ getKind()

GNodeK SVF::SVFType::getKind ( ) const
inline

Definition at line 210 of file SVFType.h.

211 {
212 return kind;
213 }

◆ getSVFInt8Type()

static SVFType * SVF::SVFType::getSVFInt8Type ( )
inlinestatic

Definition at line 181 of file SVFType.h.

182 {
183 assert(svfI8Ty && "int8 type not set?");
184 return svfI8Ty;
185 }
static SVFType * svfI8Ty
8-bit int type
Definition SVFType.h:190

◆ getSVFPtrType()

static SVFType * SVF::SVFType::getSVFPtrType ( )
inlinestatic

Definition at line 175 of file SVFType.h.

176 {
177 assert(svfPtrTy && "ptr type not set?");
178 return svfPtrTy;
179 }
static SVFType * svfPtrTy
ptr type
Definition SVFType.h:189

◆ getTypeInfo() [1/2]

StInfo * SVF::SVFType::getTypeInfo ( )
inline

Definition at line 232 of file SVFType.h.

233 {
234 assert(typeinfo && "set the type info first");
235 return typeinfo;
236 }

◆ getTypeInfo() [2/2]

const StInfo * SVF::SVFType::getTypeInfo ( ) const
inline

Definition at line 238 of file SVFType.h.

239 {
240 assert(typeinfo && "set the type info first");
241 return typeinfo;
242 }

◆ isArrayTy()

bool SVF::SVFType::isArrayTy ( ) const
inline

Definition at line 256 of file SVFType.h.

257 {
258 return kind == SVFArrayTy;
259 }

◆ isPointerTy()

bool SVF::SVFType::isPointerTy ( ) const
inline

Definition at line 251 of file SVFType.h.

252 {
253 return kind == SVFPointerTy;
254 }

◆ isSingleValueType()

bool SVF::SVFType::isSingleValueType ( ) const
inline

Definition at line 266 of file SVFType.h.

267 {
268 return isSingleValTy;
269 }

◆ isStructTy()

bool SVF::SVFType::isStructTy ( ) const
inline

Definition at line 261 of file SVFType.h.

262 {
263 return kind == SVFStructTy;
264 }

◆ print()

virtual void SVF::SVFType::print ( std::ostream &  os) const
pure virtual

◆ setTypeInfo()

void SVF::SVFType::setTypeInfo ( StInfo ti)
inline

Definition at line 227 of file SVFType.h.

228 {
229 typeinfo = ti;
230 }

◆ toString()

std::string SVF::SVFType::toString ( ) const
Note
Use os<<svfType or svfType.print(os) when possible to avoid string concatenation.

Friends And Related Symbol Documentation

◆ LLVMModuleSet

Definition at line 157 of file SVFType.h.

Member Data Documentation

◆ byteSize

u32_t SVF::SVFType::byteSize
private

LLVM Byte Size.

Definition at line 196 of file SVFType.h.

◆ id

u32_t SVF::SVFType::id
private

array

Definition at line 197 of file SVFType.h.

◆ isSingleValTy

bool SVF::SVFType::isSingleValTy
private

The type represents a single value, not struct or.

Definition at line 195 of file SVFType.h.

◆ kind

GNodeK SVF::SVFType::kind
private

used for classof

Definition at line 193 of file SVFType.h.

◆ svfI8Ty

SVFType * SVF::SVFType::svfI8Ty = nullptr
staticprivate

8-bit int type

Definition at line 190 of file SVFType.h.

◆ svfPtrTy

SVFType * SVF::SVFType::svfPtrTy = nullptr
staticprivate

ptr type

Definition at line 189 of file SVFType.h.

◆ typeinfo

StInfo* SVF::SVFType::typeinfo
private

SVF's TypeInfo.

Definition at line 194 of file SVFType.h.


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