Static Value-Flow Analysis
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Static 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)
 

Static Protected Member Functions

static void setSVFPtrType (SVFType *ptrTy)
 set svfptrty and svfi8ty when initializing SVFType from db query results
 
static void setSVFInt8Type (SVFType *i8Ty)
 

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

Member Typedef Documentation

◆ GNodeK

Definition at line 187 of file SVFType.h.

Member Enumeration Documentation

◆ SVFTyKind

Enumerator
SVFTy 
SVFPointerTy 
SVFIntegerTy 
SVFFunctionTy 
SVFStructTy 
SVFArrayTy 
SVFOtherTy 

Definition at line 189 of file SVFType.h.

190 {
191 SVFTy,
198 };

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

243 : kind(k), typeinfo(nullptr),
245 {
246 }
u32_t id
array
Definition SVFType.h:238
GNodeK kind
used for classof
Definition SVFType.h:234
u32_t byteSize
LLVM Byte Size.
Definition SVFType.h:237
StInfo * typeinfo
SVF's TypeInfo.
Definition SVFType.h:235
bool isSingleValTy
The type represents a single value, not struct or.
Definition SVFType.h:236
llvm::IRBuilder IRBuilder
Definition BasicTypes.h:76

◆ SVFType() [2/2]

SVF::SVFType::SVFType ( void  )
delete

◆ ~SVFType()

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

Definition at line 249 of file SVFType.h.

249{}

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

288 {
289 return byteSize;
290 }

◆ getId()

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

Definition at line 263 of file SVFType.h.

264 {
265 return id;
266 }

◆ getKind()

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

Definition at line 251 of file SVFType.h.

252 {
253 return kind;
254 }

◆ getSVFInt8Type()

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

Definition at line 222 of file SVFType.h.

223 {
224 assert(svfI8Ty && "int8 type not set?");
225 return svfI8Ty;
226 }
static SVFType * svfI8Ty
8-bit int type
Definition SVFType.h:231

◆ getSVFPtrType()

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

Definition at line 216 of file SVFType.h.

217 {
218 assert(svfPtrTy && "ptr type not set?");
219 return svfPtrTy;
220 }
static SVFType * svfPtrTy
ptr type
Definition SVFType.h:230

◆ getTypeInfo() [1/2]

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

Definition at line 273 of file SVFType.h.

274 {
275 assert(typeinfo && "set the type info first");
276 return typeinfo;
277 }

◆ getTypeInfo() [2/2]

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

Definition at line 279 of file SVFType.h.

280 {
281 assert(typeinfo && "set the type info first");
282 return typeinfo;
283 }

◆ isArrayTy()

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

Definition at line 297 of file SVFType.h.

298 {
299 return kind == SVFArrayTy;
300 }

◆ isPointerTy()

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

Definition at line 292 of file SVFType.h.

293 {
294 return kind == SVFPointerTy;
295 }

◆ isSingleValueType()

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

Definition at line 307 of file SVFType.h.

308 {
309 return isSingleValTy;
310 }

◆ isStructTy()

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

Definition at line 302 of file SVFType.h.

303 {
304 return kind == SVFStructTy;
305 }

◆ print()

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

◆ setSVFInt8Type()

static void SVF::SVFType::setSVFInt8Type ( SVFType i8Ty)
inlinestaticprotected

Definition at line 208 of file SVFType.h.

209 {
210 svfI8Ty = i8Ty;
211 }

◆ setSVFPtrType()

static void SVF::SVFType::setSVFPtrType ( SVFType ptrTy)
inlinestaticprotected

set svfptrty and svfi8ty when initializing SVFType from db query results

Definition at line 203 of file SVFType.h.

204 {
205 svfPtrTy = ptrTy;
206 }

◆ setTypeInfo()

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

Definition at line 268 of file SVFType.h.

269 {
270 typeinfo = ti;
271 }

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

Member Data Documentation

◆ byteSize

u32_t SVF::SVFType::byteSize
private

LLVM Byte Size.

Definition at line 237 of file SVFType.h.

◆ id

u32_t SVF::SVFType::id
private

array

Definition at line 238 of file SVFType.h.

◆ isSingleValTy

bool SVF::SVFType::isSingleValTy
private

The type represents a single value, not struct or.

Definition at line 236 of file SVFType.h.

◆ kind

GNodeK SVF::SVFType::kind
private

used for classof

Definition at line 234 of file SVFType.h.

◆ svfI8Ty

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

8-bit int type

Definition at line 231 of file SVFType.h.

◆ svfPtrTy

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

ptr type

Definition at line 230 of file SVFType.h.

◆ typeinfo

StInfo* SVF::SVFType::typeinfo
private

SVF's TypeInfo.

Definition at line 235 of file SVFType.h.


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