Static Value-Flow Analysis
Loading...
Searching...
No Matches
SVF::SVFIntegerType Class Reference

#include <SVFType.h>

Inheritance diagram for SVF::SVFIntegerType:
SVF::SVFType

Public Member Functions

 SVFIntegerType (u32_t i, u32_t byteSize=1)
void print (std::ostream &os) const override
void setSignAndWidth (short sw)
bool isSigned () 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)
StInfo * getTypeInfo ()
const StInfo * getTypeInfo () 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 SVFType * getSVFPtrType ()
static SVFType * getSVFInt8Type ()

Protected Member Functions

short getSignAndWidth () const
Protected Member Functions inherited from SVF::SVFType
 SVFType (bool svt, SVFTyKind k, u32_t i=0, u32_t Sz=1)

Private Attributes

short signAndWidth
 For printing.

Friends

class GraphDBClient

Additional Inherited Members

Public Types inherited from SVF::SVFType
enum  SVFTyKind {
  SVFTy , SVFPointerTy , SVFIntegerTy , SVFFunctionTy ,
  SVFStructTy , SVFArrayTy , SVFOtherTy
}
typedef s64_t GNodeK
Static Protected Member Functions inherited from SVF::SVFType
static void setSVFPtrType (SVFType *ptrTy)
 set svfptrty and svfi8ty when initializing SVFType from db query results
static void setSVFInt8Type (SVFType *i8Ty)

Detailed Description

Definition at line 334 of file SVFType.h.

Constructor & Destructor Documentation

◆ SVFIntegerType()

SVF::SVFIntegerType::SVFIntegerType ( u32_t i,
u32_t byteSize = 1 )
inline

Definition at line 349 of file SVFType.h.

349: SVFType(true, SVFIntegerTy, i, byteSize) {}
u32_t byteSize
LLVM Byte Size.
Definition SVFType.h:237
SVFType(void)=delete

Member Function Documentation

◆ classof()

bool SVF::SVFIntegerType::classof ( const SVFType * node)
inlinestatic

Definition at line 350 of file SVFType.h.

351 {
352 return node->getKind() == SVFIntegerTy;
353 }

◆ getSignAndWidth()

short SVF::SVFIntegerType::getSignAndWidth ( ) const
inlineprotected

Definition at line 343 of file SVFType.h.

344 {
345 return signAndWidth;
346 }
short signAndWidth
For printing.
Definition SVFType.h:339

◆ isSigned()

bool SVF::SVFIntegerType::isSigned ( ) const
inline

Definition at line 362 of file SVFType.h.

363 {
364 return signAndWidth < 0;
365 }

◆ print()

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

Implements SVF::SVFType.

Definition at line 28 of file SVFType.cpp.

29{
30 if (signAndWidth < 0)
31 os << 'i' << -signAndWidth;
32 else
33 os << 'u' << signAndWidth;
34}

◆ setSignAndWidth()

void SVF::SVFIntegerType::setSignAndWidth ( short sw)
inline

Definition at line 357 of file SVFType.h.

358 {
359 signAndWidth = sw;
360 }

◆ GraphDBClient

friend class GraphDBClient
friend

Definition at line 336 of file SVFType.h.

Member Data Documentation

◆ signAndWidth

short SVF::SVFIntegerType::signAndWidth
private

For printing.

Definition at line 339 of file SVFType.h.


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