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 SVFIRWriter
 
class SVFIRReader
 
class LLVMModuleSet
 

Detailed Description

Definition at line 156 of file SVFType.h.

Member Typedef Documentation

◆ GNodeK

Definition at line 163 of file SVFType.h.

Member Enumeration Documentation

◆ SVFTyKind

Enumerator
SVFTy 
SVFPointerTy 
SVFIntegerTy 
SVFFunctionTy 
SVFStructTy 
SVFArrayTy 
SVFOtherTy 

Definition at line 165 of file SVFType.h.

166 {
167 SVFTy,
174 };

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

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

◆ SVFType() [2/2]

SVF::SVFType::SVFType ( void  )
delete

◆ ~SVFType()

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

Definition at line 211 of file SVFType.h.

211{}

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

250 {
251 return byteSize;
252 }

◆ getId()

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

Definition at line 225 of file SVFType.h.

226 {
227 return id;
228 }

◆ getKind()

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

Definition at line 213 of file SVFType.h.

214 {
215 return kind;
216 }

◆ getSVFInt8Type()

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

Definition at line 184 of file SVFType.h.

185 {
186 assert(svfI8Ty && "int8 type not set?");
187 return svfI8Ty;
188 }
static SVFType * svfI8Ty
8-bit int type
Definition SVFType.h:193

◆ getSVFPtrType()

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

Definition at line 178 of file SVFType.h.

179 {
180 assert(svfPtrTy && "ptr type not set?");
181 return svfPtrTy;
182 }
static SVFType * svfPtrTy
ptr type
Definition SVFType.h:192

◆ getTypeInfo() [1/2]

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

Definition at line 235 of file SVFType.h.

236 {
237 assert(typeinfo && "set the type info first");
238 return typeinfo;
239 }

◆ getTypeInfo() [2/2]

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

Definition at line 241 of file SVFType.h.

242 {
243 assert(typeinfo && "set the type info first");
244 return typeinfo;
245 }

◆ isArrayTy()

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

Definition at line 259 of file SVFType.h.

260 {
261 return kind == SVFArrayTy;
262 }

◆ isPointerTy()

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

Definition at line 254 of file SVFType.h.

255 {
256 return kind == SVFPointerTy;
257 }

◆ isSingleValueType()

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

Definition at line 269 of file SVFType.h.

270 {
271 return isSingleValTy;
272 }

◆ isStructTy()

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

Definition at line 264 of file SVFType.h.

265 {
266 return kind == SVFStructTy;
267 }

◆ print()

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

◆ setTypeInfo()

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

Definition at line 230 of file SVFType.h.

231 {
232 typeinfo = ti;
233 }

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

◆ SVFIRReader

friend class SVFIRReader
friend

Definition at line 159 of file SVFType.h.

◆ SVFIRWriter

friend class SVFIRWriter
friend

Definition at line 158 of file SVFType.h.

Member Data Documentation

◆ byteSize

u32_t SVF::SVFType::byteSize
private

LLVM Byte Size.

Definition at line 199 of file SVFType.h.

◆ id

u32_t SVF::SVFType::id
private

array

Definition at line 200 of file SVFType.h.

◆ isSingleValTy

bool SVF::SVFType::isSingleValTy
private

The type represents a single value, not struct or.

Definition at line 198 of file SVFType.h.

◆ kind

GNodeK SVF::SVFType::kind
private

used for classof

Definition at line 196 of file SVFType.h.

◆ svfI8Ty

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

8-bit int type

Definition at line 193 of file SVFType.h.

◆ svfPtrTy

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

ptr type

Definition at line 192 of file SVFType.h.

◆ typeinfo

StInfo* SVF::SVFType::typeinfo
private

SVF's TypeInfo.

Definition at line 197 of file SVFType.h.


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