Skip to content

Commit 1dbfe7f

Browse files
committed
clean up code and prepare for Graph DB implementation
1 parent a58eaf8 commit 1dbfe7f

File tree

25 files changed

+10
-324
lines changed

25 files changed

+10
-324
lines changed

svf-llvm/tools/CFL/cfl.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,6 @@ int main(int argc, char ** argv)
4747
argc, argv, "CFL Reachability Analysis", "[options] <input-bitcode...>"
4848
);
4949

50-
// If the WriteAnder option is set to "ir_annotator", pre-processes the bytecodes of the modules
51-
if (Options::WriteAnder() == "ir_annotator")
52-
{
53-
LLVMModuleSet::preProcessBCs(moduleNameVec);
54-
}
55-
5650
// Pointer to the SVF Intermediate Representation (IR) of the module
5751
SVFIR* svfir = nullptr;
5852

svf-llvm/tools/DDA/dda.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,6 @@ int main(int argc, char ** argv)
5252
argc, argv, "Demand-Driven Points-to Analysis", "[options] <input-bitcode...>"
5353
);
5454

55-
if (Options::WriteAnder() == "ir_annotator")
56-
{
57-
LLVMModuleSet::preProcessBCs(moduleNameVec);
58-
}
59-
6055
LLVMModuleSet::buildSVFModule(moduleNameVec);
6156
SVFIRBuilder builder;
6257
SVFIR* pag = builder.build();

svf-llvm/tools/Example/svf-ex.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -147,11 +147,6 @@ int main(int argc, char ** argv)
147147
argc, argv, "Whole Program Points-to Analysis", "[options] <input-bitcode...>"
148148
);
149149

150-
if (Options::WriteAnder() == "ir_annotator")
151-
{
152-
LLVMModuleSet::preProcessBCs(moduleNameVec);
153-
}
154-
155150
LLVMModuleSet::buildSVFModule(moduleNameVec);
156151

157152
/// Build Program Assignment Graph (SVFIR)

svf-llvm/tools/LLVM2SVF/llvm2svf.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,6 @@ int main(int argc, char** argv)
5555
auto moduleNameVec = OptionBase::parseOptions(
5656
argc, argv, "llvm2svf", "[options] <input-bitcode...>");
5757

58-
if (Options::WriteAnder() == "ir_annotator")
59-
{
60-
LLVMModuleSet::preProcessBCs(moduleNameVec);
61-
}
62-
6358
const std::string jsonPath = replaceExtension(moduleNameVec.front());
6459
// PAG is borrowed from a unique_ptr, so we don't need to delete it.
6560

svf-llvm/tools/MTA/mta.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,6 @@ int main(int argc, char ** argv)
3838
argc, argv, "MTA Analysis", "[options] <input-bitcode...>"
3939
);
4040

41-
if (Options::WriteAnder() == "ir_annotator")
42-
{
43-
LLVMModuleSet::preProcessBCs(moduleNameVec);
44-
}
45-
4641
LLVMModuleSet::buildSVFModule(moduleNameVec);
4742
SVFIRBuilder builder;
4843
SVFIR* pag = builder.build();

svf-llvm/tools/SABER/saber.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,6 @@ int main(int argc, char ** argv)
4747
argc, argv, "Source-Sink Bug Detector", "[options] <input-bitcode...>"
4848
);
4949

50-
if (Options::WriteAnder() == "ir_annotator")
51-
{
52-
LLVMModuleSet::preProcessBCs(moduleNameVec);
53-
}
54-
5550
LLVMModuleSet::buildSVFModule(moduleNameVec);
5651
SVFIRBuilder builder;
5752
SVFIR* pag = builder.build();

svf-llvm/tools/WPA/wpa.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,6 @@ int main(int argc, char** argv)
5252
}
5353
else
5454
{
55-
if (Options::WriteAnder() == "ir_annotator")
56-
{
57-
LLVMModuleSet::preProcessBCs(moduleNameVec);
58-
}
59-
6055
LLVMModuleSet::buildSVFModule(moduleNameVec);
6156

6257
/// Build SVFIR

svf/include/Graphs/BasicBlockG.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,7 @@ class FunObjVar;
4444
typedef GenericEdge<SVFBasicBlock> GenericBasicBlockEdgeTy;
4545
class BasicBlockEdge: public GenericBasicBlockEdgeTy
4646
{
47-
friend class SVFIRWriter;
48-
friend class SVFIRReader;
4947

50-
public:
5148
public:
5249
/// Constructor
5350
BasicBlockEdge(SVFBasicBlock* s, SVFBasicBlock* d) : GenericBasicBlockEdgeTy(s, d, 0)
@@ -73,8 +70,6 @@ typedef GenericNode<SVFBasicBlock, BasicBlockEdge> GenericBasicBlockNodeTy;
7370
class SVFBasicBlock : public GenericBasicBlockNodeTy
7471
{
7572
friend class LLVMModuleSet;
76-
friend class SVFIRWriter;
77-
friend class SVFIRReader;
7873
friend class SVFIRBuilder;
7974
friend class FunObjVar;
8075
friend class ICFGBuilder;

svf/include/Graphs/CHG.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,6 @@ class CommonCHGraph
7777
typedef GenericEdge<CHNode> GenericCHEdgeTy;
7878
class CHEdge: public GenericCHEdgeTy
7979
{
80-
friend class SVFIRWriter;
81-
friend class SVFIRReader;
8280

8381
public:
8482
typedef enum
@@ -107,8 +105,6 @@ class CHEdge: public GenericCHEdgeTy
107105
typedef GenericNode<CHNode, CHEdge> GenericCHNodeTy;
108106
class CHNode: public GenericCHNodeTy
109107
{
110-
friend class SVFIRWriter;
111-
friend class SVFIRReader;
112108

113109
public:
114110
typedef enum
@@ -232,8 +228,6 @@ class CHNode: public GenericCHNodeTy
232228
typedef GenericGraph<CHNode, CHEdge> GenericCHGraphTy;
233229
class CHGraph: public CommonCHGraph, public GenericCHGraphTy
234230
{
235-
friend class SVFIRWriter;
236-
friend class SVFIRReader;
237231
friend class CHGBuilder;
238232

239233
public:

svf/include/Graphs/GenericGraph.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,6 @@ template <typename, typename> class GenericGraphReader;
4949
template<class NodeTy>
5050
class GenericEdge
5151
{
52-
friend class SVFIRWriter;
53-
friend class SVFIRReader;
5452

5553
public:
5654
/// Node type
@@ -142,8 +140,6 @@ class GenericEdge
142140
template<class NodeTy,class EdgeTy>
143141
class GenericNode: public SVFValue
144142
{
145-
friend class SVFIRWriter;
146-
friend class SVFIRReader;
147143

148144
public:
149145
typedef NodeTy NodeType;
@@ -340,8 +336,6 @@ class GenericNode: public SVFValue
340336
template<class NodeTy, class EdgeTy>
341337
class GenericGraph
342338
{
343-
friend class SVFIRWriter;
344-
friend class SVFIRReader;
345339
friend class GenericGraphWriter<NodeTy, EdgeTy>;
346340
friend class GenericGraphReader<NodeTy, EdgeTy>;
347341

0 commit comments

Comments
 (0)