#include <SaberCheckerAPI.h>
Definition at line 44 of file SaberCheckerAPI.h.
◆ TDAPIMap
◆ CHECKER_TYPE
| Enumerator |
|---|
| CK_DUMMY | |
| CK_ALLOC | dummy type
|
| CK_FREE | memory allocation
|
| CK_FOPEN | memory deallocation
|
| CK_FCLOSE | File open.
File close
|
Definition at line 48 of file SaberCheckerAPI.h.
49 {
55 };
@ CK_FREE
memory allocation
@ CK_FOPEN
memory deallocation
◆ SaberCheckerAPI()
| SVF::SaberCheckerAPI::SaberCheckerAPI |
( |
| ) |
|
|
inlineprivate |
Constructor.
Definition at line 64 of file SaberCheckerAPI.h.
65 {
67 }
void init()
Initialize the map.
◆ getCheckerAPI()
Return a static reference.
Definition at line 89 of file SaberCheckerAPI.h.
90 {
92 {
94 }
96 }
static SaberCheckerAPI * ckAPI
Static reference.
SaberCheckerAPI()
Constructor.
◆ getType()
Get the function type of a function.
Definition at line 76 of file SaberCheckerAPI.h.
77 {
78 if(F)
79 {
80 TDAPIMap::const_iterator it=
tdAPIMap.find(F->getName());
82 return it->second;
83 }
85 }
TDAPIMap tdAPIMap
API map, from a string to threadAPI type.
◆ init()
| void SaberCheckerAPI::init |
( |
| ) |
|
|
private |
Initialize the map.
initialize the map
Definition at line 164 of file SaberCheckerAPI.cpp.
165{
166 set<CHECKER_TYPE> t_seen;
170 {
172 {
173
174
175 if(t_seen.count(
p->t))
176 {
178 putc('\n', stderr);
179 assert(!"ei_pairs not grouped by type");
180 }
183 }
185 {
187 putc('\n', stderr);
188 assert(!"duplicate name in ei_pairs");
189 }
191 }
192}
static const ei_pair ei_pairs[]
◆ isFClose() [1/2]
| bool SVF::SaberCheckerAPI::isFClose |
( |
const CallICFGNode * | cs | ) |
const |
|
inline |
Definition at line 140 of file SaberCheckerAPI.h.
141 {
142 return isFClose(cs->getCalledFunction());
143 }
bool isFClose(const FunObjVar *fun) const
Return true if this call is a file close.
◆ isFClose() [2/2]
| bool SVF::SaberCheckerAPI::isFClose |
( |
const FunObjVar * | fun | ) |
const |
|
inline |
Return true if this call is a file close.
Definition at line 136 of file SaberCheckerAPI.h.
137 {
139 }
CHECKER_TYPE getType(const FunObjVar *F) const
Get the function type of a function.
◆ isFOpen() [1/2]
| bool SVF::SaberCheckerAPI::isFOpen |
( |
const CallICFGNode * | cs | ) |
const |
|
inline |
Definition at line 128 of file SaberCheckerAPI.h.
129 {
130 return isFOpen(cs->getCalledFunction());
131 }
bool isFOpen(const FunObjVar *fun) const
Return true if this call is a file open.
◆ isFOpen() [2/2]
| bool SVF::SaberCheckerAPI::isFOpen |
( |
const FunObjVar * | fun | ) |
const |
|
inline |
◆ isMemAlloc() [1/2]
| bool SVF::SaberCheckerAPI::isMemAlloc |
( |
const CallICFGNode * | cs | ) |
const |
|
inline |
Definition at line 104 of file SaberCheckerAPI.h.
105 {
107 }
bool isMemAlloc(const FunObjVar *fun) const
Return true if this call is a memory allocation.
◆ isMemAlloc() [2/2]
| bool SVF::SaberCheckerAPI::isMemAlloc |
( |
const FunObjVar * | fun | ) |
const |
|
inline |
◆ isMemDealloc() [1/2]
| bool SVF::SaberCheckerAPI::isMemDealloc |
( |
const CallICFGNode * | cs | ) |
const |
|
inline |
Definition at line 116 of file SaberCheckerAPI.h.
117 {
119 }
bool isMemDealloc(const FunObjVar *fun) const
Return true if this call is a memory deallocation.
◆ isMemDealloc() [2/2]
| bool SVF::SaberCheckerAPI::isMemDealloc |
( |
const FunObjVar * | fun | ) |
const |
|
inline |
Return true if this call is a memory deallocation.
Definition at line 112 of file SaberCheckerAPI.h.
◆ ckAPI
◆ tdAPIMap
The documentation for this class was generated from the following files: