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

#include <SVFFileSystem.h>

Public Member Functions

 SVFModuleWriter (const SVFModule *svfModule)
 
size_t getSVFValueID (const SVFValue *value)
 
const SVFValuegetSVFValuePtr (size_t id) const
 
size_t getSVFTypeID (const SVFType *type)
 
size_t getStInfoID (const StInfo *stInfo)
 
size_t sizeSVFValuePool () const
 

Private Attributes

WriterPtrPool< SVFTypesvfTypePool
 
WriterPtrPool< StInfostInfoPool
 
WriterPtrPool< SVFValuesvfValuePool
 

Friends

class SVFIRWriter
 

Detailed Description

Definition at line 344 of file SVFFileSystem.h.

Constructor & Destructor Documentation

◆ SVFModuleWriter()

SVF::SVFModuleWriter::SVFModuleWriter ( const SVFModule svfModule)

Definition at line 963 of file SVFFileSystem.cpp.

964{
965 // TODO: SVFType & StInfo are managed by SymbolTableInfo. Refactor it?
967
968 const auto& svfTypes = symTab->getSVFTypes();
969 svfTypePool.reserve(svfTypes.size());
970 for (const SVFType* type : svfTypes)
971 {
972 svfTypePool.saveID(type);
973 }
974
975 const auto& stInfos = symTab->getStInfos();
976 stInfoPool.reserve(stInfos.size());
977 for (const StInfo* stInfo : stInfos)
978 {
979 stInfoPool.saveID(stInfo);
980 }
981
982 svfValuePool.reserve(svfModule->getFunctionSet().size() +
983 svfModule->getConstantSet().size() +
984 svfModule->getOtherValueSet().size());
985}
newitem type
Definition cJSON.cpp:2739
WriterPtrPool< SVFValue > svfValuePool
WriterPtrPool< StInfo > stInfoPool
WriterPtrPool< SVFType > svfTypePool
static SymbolTableInfo * SymbolInfo()
Singleton design here to make sure we only have one instance during any analysis.
llvm::IRBuilder IRBuilder
Definition BasicTypes.h:74

Member Function Documentation

◆ getStInfoID()

size_t SVF::SVFModuleWriter::getStInfoID ( const StInfo stInfo)
inline

Definition at line 368 of file SVFFileSystem.h.

369 {
370 return stInfoPool.getID(stInfo);
371 }

◆ getSVFTypeID()

size_t SVF::SVFModuleWriter::getSVFTypeID ( const SVFType type)
inline

Definition at line 364 of file SVFFileSystem.h.

365 {
366 return svfTypePool.getID(type);
367 }

◆ getSVFValueID()

size_t SVF::SVFModuleWriter::getSVFValueID ( const SVFValue value)
inline

Definition at line 356 of file SVFFileSystem.h.

357 {
358 return svfValuePool.getID(value);
359 }

◆ getSVFValuePtr()

const SVFValue * SVF::SVFModuleWriter::getSVFValuePtr ( size_t  id) const
inline

Definition at line 360 of file SVFFileSystem.h.

361 {
362 return svfValuePool.getPtr(id);
363 }

◆ sizeSVFValuePool()

size_t SVF::SVFModuleWriter::sizeSVFValuePool ( ) const
inline

Definition at line 372 of file SVFFileSystem.h.

373 {
374 return svfValuePool.size();
375 }

Friends And Related Symbol Documentation

◆ SVFIRWriter

Definition at line 346 of file SVFFileSystem.h.

Member Data Documentation

◆ stInfoPool

WriterPtrPool<StInfo> SVF::SVFModuleWriter::stInfoPool
private

Definition at line 350 of file SVFFileSystem.h.

◆ svfTypePool

WriterPtrPool<SVFType> SVF::SVFModuleWriter::svfTypePool
private

Definition at line 349 of file SVFFileSystem.h.

◆ svfValuePool

WriterPtrPool<SVFValue> SVF::SVFModuleWriter::svfValuePool
private

Definition at line 351 of file SVFFileSystem.h.


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