svf-lib 1.0.1268 → 1.0.1269
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
Binary file
|
|
@@ -92,7 +92,7 @@ private:
|
|
|
92
92
|
OrderedNodeSet candidatePointers;
|
|
93
93
|
ICFG* icfg; // ICFG
|
|
94
94
|
CallSiteSet callSiteSet; /// all the callsites of a program
|
|
95
|
-
|
|
95
|
+
SVFModule* svfModule; /// SVF Module
|
|
96
96
|
/// Constructor
|
|
97
97
|
SVFIR(bool buildFromFile);
|
|
98
98
|
|
|
@@ -128,9 +128,14 @@ public:
|
|
|
128
128
|
{
|
|
129
129
|
return GepObjVarMap;
|
|
130
130
|
}
|
|
131
|
-
///
|
|
131
|
+
/// Set/Get ICFG
|
|
132
|
+
inline void setICFG(ICFG* i)
|
|
133
|
+
{
|
|
134
|
+
icfg = i;
|
|
135
|
+
}
|
|
132
136
|
inline ICFG* getICFG()
|
|
133
137
|
{
|
|
138
|
+
assert(icfg->totalICFGNode>0 && "empty ICFG! Build SVF IR first!");
|
|
134
139
|
return icfg;
|
|
135
140
|
}
|
|
136
141
|
/// Return valid pointers
|
|
@@ -151,10 +156,15 @@ public:
|
|
|
151
156
|
/// Whether to handle blackhole edge
|
|
152
157
|
static void handleBlackHole(bool b);
|
|
153
158
|
//@}
|
|
154
|
-
/// Get LLVM Module
|
|
159
|
+
/// Set/Get LLVM Module
|
|
160
|
+
inline void setModule(SVFModule* mod)
|
|
161
|
+
{
|
|
162
|
+
svfModule = mod;
|
|
163
|
+
}
|
|
155
164
|
inline SVFModule* getModule()
|
|
156
165
|
{
|
|
157
|
-
|
|
166
|
+
assert(svfModule && "empty SVFModule! Build SVF IR first!");
|
|
167
|
+
return svfModule;
|
|
158
168
|
}
|
|
159
169
|
/// Get/set methods to get SVFStmts based on their kinds and ICFGNodes
|
|
160
170
|
//@{
|
|
@@ -47,13 +47,13 @@ class SVFIRBuilder: public llvm::InstVisitor<SVFIRBuilder>
|
|
|
47
47
|
|
|
48
48
|
private:
|
|
49
49
|
SVFIR* pag;
|
|
50
|
-
SVFModule*
|
|
50
|
+
SVFModule* svfModule;
|
|
51
51
|
const BasicBlock* curBB; ///< Current basic block during SVFIR construction when visiting the module
|
|
52
52
|
const Value* curVal; ///< Current Value during SVFIR construction when visiting the module
|
|
53
53
|
|
|
54
54
|
public:
|
|
55
55
|
/// Constructor
|
|
56
|
-
SVFIRBuilder(): pag(SVFIR::getPAG()),
|
|
56
|
+
SVFIRBuilder(SVFModule* mod): pag(SVFIR::getPAG()), svfModule(mod), curBB(nullptr),curVal(nullptr)
|
|
57
57
|
{
|
|
58
58
|
}
|
|
59
59
|
/// Destructor
|
|
@@ -62,7 +62,7 @@ public:
|
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
/// Start building SVFIR here
|
|
65
|
-
virtual SVFIR* build(
|
|
65
|
+
virtual SVFIR* build();
|
|
66
66
|
|
|
67
67
|
/// Return SVFIR
|
|
68
68
|
SVFIR* getPAG() const
|