svf-lib 1.0.2427 → 1.0.2429

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
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -44,10 +44,7 @@ class FunObjVar;
44
44
  typedef GenericEdge<SVFBasicBlock> GenericBasicBlockEdgeTy;
45
45
  class BasicBlockEdge: public GenericBasicBlockEdgeTy
46
46
  {
47
- friend class SVFIRWriter;
48
- friend class SVFIRReader;
49
47
 
50
- public:
51
48
  public:
52
49
  /// Constructor
53
50
  BasicBlockEdge(SVFBasicBlock* s, SVFBasicBlock* d) : GenericBasicBlockEdgeTy(s, d, 0)
@@ -73,8 +70,6 @@ typedef GenericNode<SVFBasicBlock, BasicBlockEdge> GenericBasicBlockNodeTy;
73
70
  class SVFBasicBlock : public GenericBasicBlockNodeTy
74
71
  {
75
72
  friend class LLVMModuleSet;
76
- friend class SVFIRWriter;
77
- friend class SVFIRReader;
78
73
  friend class SVFIRBuilder;
79
74
  friend class FunObjVar;
80
75
  friend class ICFGBuilder;
@@ -77,8 +77,6 @@ protected:
77
77
  typedef GenericEdge<CHNode> GenericCHEdgeTy;
78
78
  class CHEdge: public GenericCHEdgeTy
79
79
  {
80
- friend class SVFIRWriter;
81
- friend class SVFIRReader;
82
80
 
83
81
  public:
84
82
  typedef enum
@@ -107,8 +105,6 @@ private:
107
105
  typedef GenericNode<CHNode, CHEdge> GenericCHNodeTy;
108
106
  class CHNode: public GenericCHNodeTy
109
107
  {
110
- friend class SVFIRWriter;
111
- friend class SVFIRReader;
112
108
 
113
109
  public:
114
110
  typedef enum
@@ -232,8 +228,6 @@ private:
232
228
  typedef GenericGraph<CHNode, CHEdge> GenericCHGraphTy;
233
229
  class CHGraph: public CommonCHGraph, public GenericCHGraphTy
234
230
  {
235
- friend class SVFIRWriter;
236
- friend class SVFIRReader;
237
231
  friend class CHGBuilder;
238
232
 
239
233
  public:
@@ -49,8 +49,6 @@ template <typename, typename> class GenericGraphReader;
49
49
  template<class NodeTy>
50
50
  class GenericEdge
51
51
  {
52
- friend class SVFIRWriter;
53
- friend class SVFIRReader;
54
52
 
55
53
  public:
56
54
  /// Node type
@@ -142,8 +140,6 @@ protected:
142
140
  template<class NodeTy,class EdgeTy>
143
141
  class GenericNode: public SVFValue
144
142
  {
145
- friend class SVFIRWriter;
146
- friend class SVFIRReader;
147
143
 
148
144
  public:
149
145
  typedef NodeTy NodeType;
@@ -340,8 +336,6 @@ public:
340
336
  template<class NodeTy, class EdgeTy>
341
337
  class GenericGraph
342
338
  {
343
- friend class SVFIRWriter;
344
- friend class SVFIRReader;
345
339
  friend class GenericGraphWriter<NodeTy, EdgeTy>;
346
340
  friend class GenericGraphReader<NodeTy, EdgeTy>;
347
341
 
@@ -47,8 +47,6 @@ typedef GenericGraph<ICFGNode,ICFGEdge> GenericICFGTy;
47
47
  class ICFG : public GenericICFGTy
48
48
  {
49
49
  friend class ICFGBuilder;
50
- friend class SVFIRWriter;
51
- friend class SVFIRReader;
52
50
  friend class ICFGSimplification;
53
51
 
54
52
  public:
@@ -43,8 +43,6 @@ class RetPE;
43
43
  typedef GenericEdge<ICFGNode> GenericICFGEdgeTy;
44
44
  class ICFGEdge : public GenericICFGEdgeTy
45
45
  {
46
- friend class SVFIRWriter;
47
- friend class SVFIRReader;
48
46
 
49
47
  public:
50
48
  /// ten types of ICFG edge
@@ -112,8 +110,6 @@ public:
112
110
  */
113
111
  class IntraCFGEdge : public ICFGEdge
114
112
  {
115
- friend class SVFIRWriter;
116
- friend class SVFIRReader;
117
113
  friend class ICFG;
118
114
  friend class SVFIRBuilder;
119
115
 
@@ -181,8 +177,6 @@ private:
181
177
  */
182
178
  class CallCFGEdge : public ICFGEdge
183
179
  {
184
- friend class SVFIRWriter;
185
- friend class SVFIRReader;
186
180
 
187
181
  private:
188
182
  std::vector<const CallPE*> callPEs;
@@ -232,8 +226,6 @@ public:
232
226
  */
233
227
  class RetCFGEdge : public ICFGEdge
234
228
  {
235
- friend class SVFIRWriter;
236
- friend class SVFIRReader;
237
229
 
238
230
  private:
239
231
  const RetPE* retPE;
@@ -53,8 +53,6 @@ typedef GenericNode<ICFGNode, ICFGEdge> GenericICFGNodeTy;
53
53
 
54
54
  class ICFGNode : public GenericICFGNodeTy
55
55
  {
56
- friend class SVFIRWriter;
57
- friend class SVFIRReader;
58
56
 
59
57
  public:
60
58
 
@@ -194,14 +192,9 @@ public:
194
192
  */
195
193
  class IntraICFGNode : public ICFGNode
196
194
  {
197
- friend class SVFIRWriter;
198
- friend class SVFIRReader;
199
195
  private:
200
196
  bool isRet;
201
197
 
202
- /// Constructor to create empty IntraICFGNode (for SVFIRReader/deserialization)
203
- IntraICFGNode(NodeID id) : ICFGNode(id, IntraBlock), isRet(false) {}
204
-
205
198
  public:
206
199
  IntraICFGNode(NodeID id, const SVFBasicBlock* b, bool isReturn) : ICFGNode(id, IntraBlock), isRet(isReturn)
207
200
  {
@@ -277,17 +270,12 @@ public:
277
270
  */
278
271
  class FunEntryICFGNode : public InterICFGNode
279
272
  {
280
- friend class SVFIRWriter;
281
- friend class SVFIRReader;
282
273
 
283
274
  public:
284
275
  typedef std::vector<const SVFVar *> FormalParmNodeVec;
285
276
  private:
286
277
  FormalParmNodeVec FPNodes;
287
278
 
288
- /// Constructor to create empty FunEntryICFGNode (for SVFIRReader/deserialization)
289
- FunEntryICFGNode(NodeID id) : InterICFGNode(id, FunEntryBlock) {}
290
-
291
279
  public:
292
280
  FunEntryICFGNode(NodeID id, const FunObjVar* f);
293
281
 
@@ -347,15 +335,10 @@ public:
347
335
  */
348
336
  class FunExitICFGNode : public InterICFGNode
349
337
  {
350
- friend class SVFIRWriter;
351
- friend class SVFIRReader;
352
338
 
353
339
  private:
354
340
  const SVFVar *formalRet;
355
341
 
356
- /// Constructor to create empty FunExitICFGNode (for SVFIRReader/deserialization)
357
- FunExitICFGNode(NodeID id) : InterICFGNode(id, FunExitBlock), formalRet{} {}
358
-
359
342
  public:
360
343
  FunExitICFGNode(NodeID id, const FunObjVar* f);
361
344
 
@@ -415,8 +398,6 @@ public:
415
398
  */
416
399
  class CallICFGNode : public InterICFGNode
417
400
  {
418
- friend class SVFIRWriter;
419
- friend class SVFIRReader;
420
401
 
421
402
  public:
422
403
  typedef std::vector<const ValVar *> ActualParmNodeVec;
@@ -431,9 +412,6 @@ protected:
431
412
  s32_t virtualFunIdx; /// virtual function index of the virtual table(s) at a virtual call
432
413
  std::string funNameOfVcall; /// the function name of this virtual call
433
414
 
434
- /// Constructor to create empty CallICFGNode (for SVFIRReader/deserialization)
435
- CallICFGNode(NodeID id) : InterICFGNode(id, FunCallBlock), ret{} {}
436
-
437
415
  public:
438
416
  CallICFGNode(NodeID id, const SVFBasicBlock* b, const SVFType* ty,
439
417
  const FunObjVar* cf, bool iv, bool ivc, s32_t vfi,
@@ -591,19 +569,11 @@ public:
591
569
  */
592
570
  class RetICFGNode : public InterICFGNode
593
571
  {
594
- friend class SVFIRWriter;
595
- friend class SVFIRReader;
596
572
 
597
573
  private:
598
574
  const SVFVar *actualRet;
599
575
  const CallICFGNode* callBlockNode;
600
576
 
601
- /// Constructor to create empty RetICFGNode (for SVFIRReader/deserialization)
602
- RetICFGNode(NodeID id)
603
- : InterICFGNode(id, FunRetBlock), actualRet{}, callBlockNode{}
604
- {
605
- }
606
-
607
577
  public:
608
578
  RetICFGNode(NodeID id, CallICFGNode* cb) :
609
579
  InterICFGNode(id, FunRetBlock), actualRet(nullptr), callBlockNode(cb)
@@ -50,8 +50,6 @@ class ObjTypeInfo;
50
50
  */
51
51
  class IRGraph : public GenericGraph<SVFVar, SVFStmt>
52
52
  {
53
- friend class SVFIRWriter;
54
- friend class SVFIRReader;
55
53
  friend class SVFIRBuilder;
56
54
  friend class SymbolTableBuilder;
57
55
 
@@ -51,8 +51,6 @@ class SVFVar;
51
51
  */
52
52
  class AccessPath
53
53
  {
54
- friend class SVFIRWriter;
55
- friend class SVFIRReader;
56
54
 
57
55
  public:
58
56
  enum LSRelation
@@ -37,8 +37,6 @@ namespace SVF
37
37
 
38
38
  class SVFLoop
39
39
  {
40
- friend class SVFIRWriter;
41
- friend class SVFIRReader;
42
40
 
43
41
  typedef Set<const ICFGEdge *> ICFGEdgeSet;
44
42
  typedef Set<const ICFGNode *> ICFGNodeSet;
@@ -41,8 +41,6 @@ namespace SVF
41
41
  */
42
42
  class ObjTypeInfo
43
43
  {
44
- friend class SVFIRWriter;
45
- friend class SVFIRReader;
46
44
  friend class SymbolTableBuilder;
47
45
 
48
46
  public:
@@ -45,8 +45,6 @@ class SVFIR : public IRGraph
45
45
  friend class ExternalPAG;
46
46
  friend class PAGBuilderFromFile;
47
47
  friend class TypeBasedHeapCloning;
48
- friend class SVFIRWriter;
49
- friend class SVFIRReader;
50
48
  friend class BVDataPTAImpl;
51
49
 
52
50
  public:
@@ -51,8 +51,6 @@ class SVFBasicBlock;
51
51
  typedef GenericEdge<SVFVar> GenericPAGEdgeTy;
52
52
  class SVFStmt : public GenericPAGEdgeTy
53
53
  {
54
- friend class SVFIRWriter;
55
- friend class SVFIRReader;
56
54
 
57
55
  public:
58
56
  /// Types of SVFIR statements
@@ -233,8 +231,6 @@ private:
233
231
  */
234
232
  class AssignStmt : public SVFStmt
235
233
  {
236
- friend class SVFIRWriter;
237
- friend class SVFIRReader;
238
234
 
239
235
  private:
240
236
  AssignStmt(); ///< place holder
@@ -248,8 +244,6 @@ private:
248
244
  protected:
249
245
  /// constructor
250
246
  AssignStmt(SVFVar* s, SVFVar* d, GEdgeFlag k) : SVFStmt(s, d, k) {}
251
- /// Constructor to create empty AssignStmt (for SVFIRReader/serialization)
252
- AssignStmt(GEdgeFlag k) : SVFStmt(k) {}
253
247
 
254
248
  public:
255
249
  /// Methods for support type inquiry through isa, cast, and dyn_cast:
@@ -309,12 +303,8 @@ public:
309
303
  */
310
304
  class AddrStmt: public AssignStmt
311
305
  {
312
- friend class SVFIRWriter;
313
- friend class SVFIRReader;
314
306
 
315
307
  private:
316
- /// Constructs empty AddrStmt (for SVFIRReader/serialization)
317
- AddrStmt() : AssignStmt(SVFStmt::Addr) {}
318
308
  AddrStmt(const AddrStmt&); ///< place holder
319
309
  void operator=(const AddrStmt&); ///< place holder
320
310
 
@@ -360,11 +350,8 @@ public:
360
350
  */
361
351
  class CopyStmt: public AssignStmt
362
352
  {
363
- friend class SVFIRWriter;
364
- friend class SVFIRReader;
353
+
365
354
  private:
366
- /// Constructs empty CopyStmt (for SVFIRReader/serialization)
367
- CopyStmt() : AssignStmt(SVFStmt::Copy) {}
368
355
  CopyStmt(const CopyStmt&); ///< place holder
369
356
  void operator=(const CopyStmt&); ///< place holder
370
357
  public:
@@ -448,12 +435,8 @@ private:
448
435
  */
449
436
  class StoreStmt: public AssignStmt
450
437
  {
451
- friend class SVFIRWriter;
452
- friend class SVFIRReader;
453
438
 
454
439
  private:
455
- /// Constructs empty StoreStmt (for SVFIRReader/serialization)
456
- StoreStmt() : AssignStmt(SVFStmt::Store) {}
457
440
  StoreStmt(const StoreStmt&); ///< place holder
458
441
  void operator=(const StoreStmt&); ///< place holder
459
442
 
@@ -485,12 +468,8 @@ public:
485
468
  */
486
469
  class LoadStmt: public AssignStmt
487
470
  {
488
- friend class SVFIRWriter;
489
- friend class SVFIRReader;
490
471
 
491
472
  private:
492
- /// Constructs empty LoadStmt (for SVFIRReader/serialization)
493
- LoadStmt(): AssignStmt(SVFStmt::Load) {}
494
473
  LoadStmt(const LoadStmt&); ///< place holder
495
474
  void operator=(const LoadStmt&); ///< place holder
496
475
 
@@ -522,12 +501,8 @@ public:
522
501
  */
523
502
  class GepStmt: public AssignStmt
524
503
  {
525
- friend class SVFIRWriter;
526
- friend class SVFIRReader;
527
504
 
528
505
  private:
529
- /// Constructs empty GepStmt (for SVFIRReader/serialization)
530
- GepStmt() : AssignStmt(SVFStmt::Gep) {}
531
506
  GepStmt(const GepStmt &); ///< place holder
532
507
  void operator=(const GepStmt &); ///< place holder
533
508
 
@@ -607,8 +582,6 @@ public:
607
582
  */
608
583
  class CallPE: public AssignStmt
609
584
  {
610
- friend class SVFIRWriter;
611
- friend class SVFIRReader;
612
585
 
613
586
  private:
614
587
  CallPE(const CallPE&); ///< place holder
@@ -616,9 +589,6 @@ private:
616
589
 
617
590
  const CallICFGNode* call; /// the callsite statement calling from
618
591
  const FunEntryICFGNode* entry; /// the function exit statement calling to
619
- protected:
620
- /// Constructs empty CallPE (for SVFIRReader/serialization)
621
- CallPE(GEdgeFlag k = SVFStmt::Call) : AssignStmt(k), call{}, entry{} {}
622
592
 
623
593
  public:
624
594
  /// Methods for support type inquiry through isa, cast, and dyn_cast:
@@ -667,8 +637,6 @@ public:
667
637
  */
668
638
  class RetPE: public AssignStmt
669
639
  {
670
- friend class SVFIRWriter;
671
- friend class SVFIRReader;
672
640
 
673
641
  private:
674
642
  RetPE(const RetPE&); ///< place holder
@@ -677,10 +645,6 @@ private:
677
645
  const CallICFGNode* call; /// the callsite statement returning to
678
646
  const FunExitICFGNode* exit; /// the function exit statement returned from
679
647
 
680
- protected:
681
- /// Constructs empty RetPE (for SVFIRReader/serialization)
682
- RetPE(GEdgeFlag k = SVFStmt::Ret) : AssignStmt(k), call{}, exit{} {}
683
-
684
648
  public:
685
649
  /// Methods for support type inquiry through isa, cast, and dyn_cast:
686
650
  //@{
@@ -728,8 +692,6 @@ public:
728
692
  */
729
693
  class MultiOpndStmt : public SVFStmt
730
694
  {
731
- friend class SVFIRWriter;
732
- friend class SVFIRReader;
733
695
 
734
696
  public:
735
697
  typedef std::vector<SVFVar*> OPVars;
@@ -747,8 +709,6 @@ protected:
747
709
  OPVars opVars;
748
710
  /// Constructor, only used by subclasses but not external users
749
711
  MultiOpndStmt(SVFVar* r, const OPVars& opnds, GEdgeFlag k);
750
- /// Constructs empty MultiOpndStmt (for SVFIRReader/serialization)
751
- MultiOpndStmt(GEdgeFlag k) : SVFStmt(k) {}
752
712
 
753
713
  public:
754
714
  /// Methods for support type inquiry through isa, cast, and dyn_cast:
@@ -810,15 +770,11 @@ public:
810
770
  */
811
771
  class PhiStmt: public MultiOpndStmt
812
772
  {
813
- friend class SVFIRWriter;
814
- friend class SVFIRReader;
815
773
 
816
774
  public:
817
775
  typedef std::vector<const ICFGNode*> OpICFGNodeVec;
818
776
 
819
777
  private:
820
- /// Constructs empty PhiStmt (for SVFIRReader/serialization)
821
- PhiStmt() : MultiOpndStmt(SVFStmt::Phi) {}
822
778
  PhiStmt(const PhiStmt&); ///< place holder
823
779
  void operator=(const PhiStmt&); ///< place holder
824
780
 
@@ -878,12 +834,8 @@ public:
878
834
  */
879
835
  class SelectStmt: public MultiOpndStmt
880
836
  {
881
- friend class SVFIRWriter;
882
- friend class SVFIRReader;
883
837
 
884
838
  private:
885
- /// Constructs empty SelectStmt (for SVFIRReader/serialization)
886
- SelectStmt() : MultiOpndStmt(SVFStmt::Select), condition{} {}
887
839
  SelectStmt(const SelectStmt&); ///< place holder
888
840
  void operator=(const SelectStmt&); ///< place holder
889
841
 
@@ -933,12 +885,8 @@ public:
933
885
  */
934
886
  class CmpStmt: public MultiOpndStmt
935
887
  {
936
- friend class SVFIRWriter;
937
- friend class SVFIRReader;
938
888
 
939
889
  private:
940
- /// Constructs empty CmpStmt (for SVFIRReader/serialization)
941
- CmpStmt() : MultiOpndStmt(SVFStmt::Cmp) {}
942
890
  CmpStmt(const CmpStmt&); ///< place holder
943
891
  void operator=(const CmpStmt&); ///< place holder
944
892
 
@@ -1019,12 +967,8 @@ public:
1019
967
  */
1020
968
  class BinaryOPStmt: public MultiOpndStmt
1021
969
  {
1022
- friend class SVFIRWriter;
1023
- friend class SVFIRReader;
1024
970
 
1025
971
  private:
1026
- /// Constructs empty BinaryOPStmt (for SVFIRReader/serialization)
1027
- BinaryOPStmt() : MultiOpndStmt(SVFStmt::BinaryOp) {}
1028
972
  BinaryOPStmt(const BinaryOPStmt&); ///< place holder
1029
973
  void operator=(const BinaryOPStmt&); ///< place holder
1030
974
  u32_t opcode;
@@ -1089,12 +1033,8 @@ public:
1089
1033
  */
1090
1034
  class UnaryOPStmt: public SVFStmt
1091
1035
  {
1092
- friend class SVFIRWriter;
1093
- friend class SVFIRReader;
1094
1036
 
1095
1037
  private:
1096
- /// Constructs empty UnaryOPStmt (for SVFIRReader/serialization)
1097
- UnaryOPStmt() : SVFStmt(SVFStmt::UnaryOp) {}
1098
1038
  UnaryOPStmt(const UnaryOPStmt&); ///< place holder
1099
1039
  void operator=(const UnaryOPStmt&); ///< place holder
1100
1040
  SVFVar* getSrcNode(); ///< place holder, use getOpVar() instead
@@ -1156,15 +1096,11 @@ public:
1156
1096
  */
1157
1097
  class BranchStmt: public SVFStmt
1158
1098
  {
1159
- friend class SVFIRWriter;
1160
- friend class SVFIRReader;
1161
1099
 
1162
1100
  public:
1163
1101
  typedef std::vector<std::pair<const ICFGNode*, s32_t>> SuccAndCondPairVec;
1164
1102
 
1165
1103
  private:
1166
- /// Constructs empty BranchStmt (for SVFIRReader/serialization)
1167
- BranchStmt() : SVFStmt(SVFStmt::Branch), cond{}, brInst{} {}
1168
1104
  BranchStmt(const BranchStmt&); ///< place holder
1169
1105
  void operator=(const BranchStmt&); ///< place holder
1170
1106
  SVFVar* getSrcNode(); ///< place holder, not allowed
@@ -1246,12 +1182,8 @@ public:
1246
1182
  */
1247
1183
  class TDForkPE: public CallPE
1248
1184
  {
1249
- friend class SVFIRWriter;
1250
- friend class SVFIRReader;
1251
1185
 
1252
1186
  private:
1253
- /// Constructs empty TDForkPE (for SVFIRReader/serialization)
1254
- TDForkPE() : CallPE(SVFStmt::ThreadFork) {}
1255
1187
  TDForkPE(const TDForkPE&); ///< place holder
1256
1188
  void operator=(const TDForkPE&); ///< place holder
1257
1189
 
@@ -1287,12 +1219,8 @@ public:
1287
1219
  */
1288
1220
  class TDJoinPE: public RetPE
1289
1221
  {
1290
- friend class SVFIRWriter;
1291
- friend class SVFIRReader;
1292
1222
 
1293
1223
  private:
1294
- /// Constructs empty TDJoinPE (for SVFIRReader/serialization)
1295
- TDJoinPE() : RetPE(SVFStmt::ThreadJoin) {}
1296
1224
  TDJoinPE(const TDJoinPE&); ///< place holder
1297
1225
  void operator=(const TDJoinPE&); ///< place holder
1298
1226
 
@@ -45,8 +45,6 @@ class SVFPointerType;
45
45
  */
46
46
  class StInfo
47
47
  {
48
- friend class SVFIRWriter;
49
- friend class SVFIRReader;
50
48
 
51
49
  private:
52
50
  /// flattened field indices of a struct (ignoring arrays)
@@ -155,8 +153,7 @@ public:
155
153
 
156
154
  class SVFType
157
155
  {
158
- friend class SVFIRWriter;
159
- friend class SVFIRReader;
156
+
160
157
  friend class LLVMModuleSet;
161
158
 
162
159
  public:
@@ -276,8 +273,6 @@ std::ostream& operator<<(std::ostream& os, const SVFType& type);
276
273
 
277
274
  class SVFPointerType : public SVFType
278
275
  {
279
- friend class SVFIRWriter;
280
- friend class SVFIRReader;
281
276
 
282
277
  public:
283
278
  SVFPointerType(u32_t i, u32_t byteSize = 1)
@@ -295,8 +290,6 @@ public:
295
290
 
296
291
  class SVFIntegerType : public SVFType
297
292
  {
298
- friend class SVFIRWriter;
299
- friend class SVFIRReader;
300
293
 
301
294
  private:
302
295
  short signAndWidth; ///< For printing
@@ -323,8 +316,6 @@ public:
323
316
 
324
317
  class SVFFunctionType : public SVFType
325
318
  {
326
- friend class SVFIRWriter;
327
- friend class SVFIRReader;
328
319
 
329
320
  private:
330
321
  const SVFType* retTy;
@@ -362,8 +353,6 @@ public:
362
353
 
363
354
  class SVFStructType : public SVFType
364
355
  {
365
- friend class SVFIRWriter;
366
- friend class SVFIRReader;
367
356
 
368
357
  private:
369
358
  /// @brief Field for printing & debugging
@@ -404,8 +393,6 @@ public:
404
393
 
405
394
  class SVFArrayType : public SVFType
406
395
  {
407
- friend class SVFIRWriter;
408
- friend class SVFIRReader;
409
396
 
410
397
  private:
411
398
  unsigned numOfElement; /// For printing & debugging
@@ -444,8 +431,6 @@ public:
444
431
 
445
432
  class SVFOtherType : public SVFType
446
433
  {
447
- friend class SVFIRWriter;
448
- friend class SVFIRReader;
449
434
 
450
435
  private:
451
436
  std::string repr; /// Field representation for printing
@@ -47,8 +47,7 @@ class SVFVar;
47
47
  typedef GenericNode<SVFVar, SVFStmt> GenericPAGNodeTy;
48
48
  class SVFVar : public GenericPAGNodeTy
49
49
  {
50
- friend class SVFIRWriter;
51
- friend class SVFIRReader;
50
+
52
51
  friend class SVFIRBuilder;
53
52
  friend class IRGraph;
54
53
  friend class SVFIR;
@@ -248,14 +247,9 @@ public:
248
247
  */
249
248
  class ValVar: public SVFVar
250
249
  {
251
- friend class SVFIRWriter;
252
- friend class SVFIRReader;
253
250
 
254
251
  private:
255
252
  const ICFGNode* icfgNode; // icfgnode related to valvar
256
- protected:
257
- /// Constructor to create an empty ValVar (for SVFIRReader/deserialization)
258
- ValVar(NodeID i, PNODEK ty = ValNode) : SVFVar(i, ty), icfgNode(nullptr) {}
259
253
 
260
254
  public:
261
255
  /// Methods for support type inquiry through isa, cast, and dyn_cast:
@@ -304,12 +298,8 @@ public:
304
298
  */
305
299
  class ObjVar: public SVFVar
306
300
  {
307
- friend class SVFIRWriter;
308
- friend class SVFIRReader;
309
301
 
310
302
  protected:
311
- /// Constructor to create an empty ObjVar (for SVFIRReader/deserialization)
312
- ObjVar(NodeID i, PNODEK ty = ObjNode) : SVFVar(i, ty) {}
313
303
  /// Constructor
314
304
  ObjVar(NodeID i, const SVFType* svfType, PNODEK ty = ObjNode) :
315
305
  SVFVar(i, svfType, ty)
@@ -354,17 +344,11 @@ public:
354
344
  */
355
345
  class ArgValVar: public ValVar
356
346
  {
357
- friend class SVFIRWriter;
358
- friend class SVFIRReader;
359
347
 
360
348
  private:
361
349
  const FunObjVar* cgNode;
362
350
  u32_t argNo;
363
351
 
364
- protected:
365
- /// Constructor to create function argument (for SVFIRReader/deserialization)
366
- ArgValVar(NodeID i, PNODEK ty = ArgValNode) : ValVar(i, ty) {}
367
-
368
352
  public:
369
353
  /// Methods for support type inquiry through isa, cast, and dyn_cast:
370
354
  //@{
@@ -426,17 +410,12 @@ public:
426
410
  */
427
411
  class GepValVar: public ValVar
428
412
  {
429
- friend class SVFIRWriter;
430
- friend class SVFIRReader;
431
413
 
432
414
  private:
433
415
  AccessPath ap; // AccessPath
434
416
  const ValVar* base; // base node
435
417
  const SVFType* gepValType;
436
418
 
437
- /// Constructor to create empty GeValVar (for SVFIRReader/deserialization)
438
- GepValVar(NodeID i) : ValVar(i, GepValNode), gepValType{} {}
439
-
440
419
  public:
441
420
  /// Methods for support type inquiry through isa, cast, and dyn_cast:
442
421
  //@{
@@ -522,18 +501,12 @@ public:
522
501
  */
523
502
  class BaseObjVar : public ObjVar
524
503
  {
525
- friend class SVFIRWriter;
526
- friend class SVFIRReader;
527
504
  friend class SVFIRBuilder;
528
505
  private:
529
506
  ObjTypeInfo* typeInfo;
530
507
 
531
508
  const ICFGNode* icfgNode; /// ICFGNode related to the creation of this object
532
509
 
533
- protected:
534
- /// Constructor to create empty ObjVar (for SVFIRReader/deserialization)
535
- BaseObjVar(NodeID i, const ICFGNode* node, PNODEK ty = BaseObjNode) : ObjVar(i, ty), icfgNode(node) {}
536
-
537
510
  public:
538
511
  /// Methods for support type inquiry through isa, cast, and dyn_cast:
539
512
  //@{
@@ -725,18 +698,12 @@ public:
725
698
  */
726
699
  class GepObjVar: public ObjVar
727
700
  {
728
- friend class SVFIRWriter;
729
- friend class SVFIRReader;
730
701
 
731
702
  private:
732
703
  APOffset apOffset = 0;
733
704
 
734
705
  const BaseObjVar* base;
735
706
 
736
- /// Constructor to create empty GepObjVar (for SVFIRReader/deserialization)
737
- // only for reading from file when we don't have BaseObjVar*
738
- GepObjVar(NodeID i, PNODEK ty = GepObjNode) : ObjVar(i, ty), base{} {}
739
-
740
707
  public:
741
708
  /// Methods for support type inquiry through isa, cast, and dyn_cast:
742
709
  //@{
@@ -835,13 +802,6 @@ public:
835
802
  class HeapObjVar: public BaseObjVar
836
803
  {
837
804
 
838
- friend class SVFIRWriter;
839
- friend class SVFIRReader;
840
-
841
- protected:
842
- /// Constructor to create heap object var
843
- HeapObjVar(NodeID i, const ICFGNode* node) : BaseObjVar(i, node, HeapObjNode) {}
844
-
845
805
  public:
846
806
  /// Methods for support type inquiry through isa, cast, and dyn_cast:
847
807
  //@{
@@ -898,13 +858,6 @@ public:
898
858
  class StackObjVar: public BaseObjVar
899
859
  {
900
860
 
901
- friend class SVFIRWriter;
902
- friend class SVFIRReader;
903
-
904
- protected:
905
- /// Constructor to create stack object var
906
- StackObjVar(NodeID i, const ICFGNode* node) : BaseObjVar(i, node, StackObjNode) {}
907
-
908
861
  public:
909
862
  /// Methods for support type inquiry through isa, cast, and dyn_cast:
910
863
  //@{
@@ -954,8 +907,6 @@ class CallGraphNode;
954
907
 
955
908
  class FunObjVar : public BaseObjVar
956
909
  {
957
- friend class SVFIRWriter;
958
- friend class SVFIRReader;
959
910
  friend class SVFIRBuilder;
960
911
  friend class LLVMModuleSet;
961
912
 
@@ -981,11 +932,6 @@ private:
981
932
  std::vector<const ArgValVar*> allArgs; /// all formal arguments of this function
982
933
  const SVFBasicBlock *exitBlock; /// a 'single' basic block having no successors and containing return instruction in a function
983
934
 
984
-
985
- private:
986
- /// Constructor to create empty ObjVar (for SVFIRReader/deserialization)
987
- FunObjVar(NodeID i, const ICFGNode* node) : BaseObjVar(i,node, FunObjNode) {}
988
-
989
935
  public:
990
936
  /// Methods for support type inquiry through isa, cast, and dyn_cast:
991
937
  //@{
@@ -1231,8 +1177,7 @@ public:
1231
1177
  };
1232
1178
  class FunValVar : public ValVar
1233
1179
  {
1234
- friend class SVFIRWriter;
1235
- friend class SVFIRReader;
1180
+
1236
1181
  private:
1237
1182
  const FunObjVar* funObjVar;
1238
1183
 
@@ -1282,8 +1227,6 @@ public:
1282
1227
 
1283
1228
  class GlobalValVar : public ValVar
1284
1229
  {
1285
- friend class SVFIRWriter;
1286
- friend class SVFIRReader;
1287
1230
 
1288
1231
  public:
1289
1232
  /// Methods for support type inquiry through isa, cast, and dyn_cast:
@@ -1323,8 +1266,6 @@ public:
1323
1266
 
1324
1267
  class ConstAggValVar: public ValVar
1325
1268
  {
1326
- friend class SVFIRWriter;
1327
- friend class SVFIRReader;
1328
1269
 
1329
1270
  public:
1330
1271
  /// Methods for support type inquiry through isa, cast, and dyn_cast:
@@ -1375,8 +1316,6 @@ public:
1375
1316
 
1376
1317
  class ConstDataValVar : public ValVar
1377
1318
  {
1378
- friend class SVFIRWriter;
1379
- friend class SVFIRReader;
1380
1319
 
1381
1320
  public:
1382
1321
  /// Methods for support type inquiry through isa, cast, and dyn_cast:
@@ -1426,8 +1365,6 @@ public:
1426
1365
 
1427
1366
  class BlackHoleValVar : public ConstDataValVar
1428
1367
  {
1429
- friend class SVFIRWriter;
1430
- friend class SVFIRReader;
1431
1368
 
1432
1369
  public:
1433
1370
  /// Methods for support type inquiry through isa, cast, and dyn_cast:
@@ -1478,8 +1415,7 @@ public:
1478
1415
 
1479
1416
  class ConstFPValVar : public ConstDataValVar
1480
1417
  {
1481
- friend class SVFIRWriter;
1482
- friend class SVFIRReader;
1418
+
1483
1419
  private:
1484
1420
  double dval;
1485
1421
 
@@ -1529,8 +1465,7 @@ public:
1529
1465
 
1530
1466
  class ConstIntValVar : public ConstDataValVar
1531
1467
  {
1532
- friend class SVFIRWriter;
1533
- friend class SVFIRReader;
1468
+
1534
1469
  private:
1535
1470
  u64_t zval;
1536
1471
  s64_t sval;
@@ -1586,8 +1521,6 @@ public:
1586
1521
 
1587
1522
  class ConstNullPtrValVar : public ConstDataValVar
1588
1523
  {
1589
- friend class SVFIRWriter;
1590
- friend class SVFIRReader;
1591
1524
 
1592
1525
  public:
1593
1526
  /// Methods for support type inquiry through isa, cast, and dyn_cast:
@@ -1635,12 +1568,6 @@ public:
1635
1568
 
1636
1569
  class GlobalObjVar : public BaseObjVar
1637
1570
  {
1638
- friend class SVFIRWriter;
1639
- friend class SVFIRReader;
1640
-
1641
- private:
1642
- /// Constructor to create empty ObjVar (for SVFIRReader/deserialization)
1643
- GlobalObjVar(NodeID i, const ICFGNode* node) : BaseObjVar(i, node, GlobalObjNode) {}
1644
1571
 
1645
1572
  public:
1646
1573
  /// Methods for support type inquiry through isa, cast, and dyn_cast:
@@ -1684,8 +1611,6 @@ public:
1684
1611
 
1685
1612
  class ConstAggObjVar : public BaseObjVar
1686
1613
  {
1687
- friend class SVFIRWriter;
1688
- friend class SVFIRReader;
1689
1614
 
1690
1615
  public:
1691
1616
  /// Methods for support type inquiry through isa, cast, and dyn_cast:
@@ -1739,12 +1664,6 @@ public:
1739
1664
 
1740
1665
  class ConstDataObjVar : public BaseObjVar
1741
1666
  {
1742
- friend class SVFIRWriter;
1743
- friend class SVFIRReader;
1744
-
1745
- protected:
1746
- /// Constructor to create empty DummyObjVar (for SVFIRReader/deserialization)
1747
- ConstDataObjVar(NodeID i, const ICFGNode* node) : BaseObjVar(i, node, ConstDataObjNode) {}
1748
1667
 
1749
1668
  public:
1750
1669
  //@{ Methods for support type inquiry through isa, cast, and dyn_cast:
@@ -1796,12 +1715,6 @@ public:
1796
1715
 
1797
1716
  class ConstFPObjVar : public ConstDataObjVar
1798
1717
  {
1799
- friend class SVFIRWriter;
1800
- friend class SVFIRReader;
1801
-
1802
- private:
1803
- /// Constructor to create empty DummyObjVar (for SVFIRReader/deserialization)
1804
- ConstFPObjVar(NodeID i, const ICFGNode* node) : ConstDataObjVar(i, node) {}
1805
1718
 
1806
1719
  private:
1807
1720
  float dval;
@@ -1859,12 +1772,6 @@ public:
1859
1772
 
1860
1773
  class ConstIntObjVar : public ConstDataObjVar
1861
1774
  {
1862
- friend class SVFIRWriter;
1863
- friend class SVFIRReader;
1864
-
1865
- private:
1866
- /// Constructor to create empty DummyObjVar (for SVFIRReader/deserialization)
1867
- ConstIntObjVar(NodeID i, const ICFGNode* node) : ConstDataObjVar(i, node) {}
1868
1775
 
1869
1776
  private:
1870
1777
  u64_t zval;
@@ -1929,12 +1836,6 @@ public:
1929
1836
 
1930
1837
  class ConstNullPtrObjVar : public ConstDataObjVar
1931
1838
  {
1932
- friend class SVFIRWriter;
1933
- friend class SVFIRReader;
1934
-
1935
- private:
1936
- /// Constructor to create empty DummyObjVar (for SVFIRReader/deserialization)
1937
- ConstNullPtrObjVar(NodeID i, const ICFGNode* node) : ConstDataObjVar(i, node) {}
1938
1839
 
1939
1840
  public:
1940
1841
  //@{ Methods for support type inquiry through isa, cast, and dyn_cast:
@@ -1988,14 +1889,9 @@ public:
1988
1889
  */
1989
1890
  class RetValPN : public ValVar
1990
1891
  {
1991
- friend class SVFIRWriter;
1992
- friend class SVFIRReader;
1993
1892
 
1994
1893
  private:
1995
1894
  const FunObjVar* callGraphNode;
1996
- private:
1997
- /// Constructor to create empty RetValPN (for SVFIRReader/deserialization)
1998
- RetValPN(NodeID i) : ValVar(i, RetValNode) {}
1999
1895
 
2000
1896
  public:
2001
1897
  //@{ Methods for support type inquiry through isa, cast, and dyn_cast:
@@ -2045,14 +1941,9 @@ public:
2045
1941
  */
2046
1942
  class VarArgValPN : public ValVar
2047
1943
  {
2048
- friend class SVFIRWriter;
2049
- friend class SVFIRReader;
2050
- private:
2051
- const FunObjVar* callGraphNode;
2052
1944
 
2053
1945
  private:
2054
- /// Constructor to create empty VarArgValPN (for SVFIRReader/deserialization)
2055
- VarArgValPN(NodeID i) : ValVar(i, VarargValNode) {}
1946
+ const FunObjVar* callGraphNode;
2056
1947
 
2057
1948
  public:
2058
1949
  //@{ Methods for support type inquiry through isa, cast, and dyn_cast:
@@ -2101,8 +1992,6 @@ public:
2101
1992
  */
2102
1993
  class DummyValVar: public ValVar
2103
1994
  {
2104
- friend class SVFIRWriter;
2105
- friend class SVFIRReader;
2106
1995
 
2107
1996
  public:
2108
1997
  //@{ Methods for support type inquiry through isa, cast, and dyn_cast:
@@ -2153,12 +2042,6 @@ public:
2153
2042
  */
2154
2043
  class DummyObjVar: public BaseObjVar
2155
2044
  {
2156
- friend class SVFIRWriter;
2157
- friend class SVFIRReader;
2158
-
2159
- private:
2160
- /// Constructor to create empty DummyObjVar (for SVFIRReader/deserialization)
2161
- DummyObjVar(NodeID i, const ICFGNode* node) : BaseObjVar(i, node, DummyObjNode) {}
2162
2045
 
2163
2046
  public:
2164
2047
  //@{ Methods for support type inquiry through isa, cast, and dyn_cast:
@@ -19,8 +19,6 @@ class BVDataPTAImpl;
19
19
  /// all symbols have been allocated through endSymbolAllocation.
20
20
  class NodeIDAllocator
21
21
  {
22
- friend class SVFIRWriter;
23
- friend class SVFIRReader;
24
22
 
25
23
  public:
26
24
  /// Allocation strategy to use.
@@ -40,8 +40,7 @@ namespace SVF
40
40
  {
41
41
  class SVFLoopAndDomInfo
42
42
  {
43
- friend class SVFIRWriter;
44
- friend class SVFIRReader;
43
+
45
44
  public:
46
45
  typedef Set<const SVFBasicBlock*> BBSet;
47
46
  typedef std::vector<const SVFBasicBlock*> BBList;
@@ -258,8 +258,6 @@ inline unsigned countPopulation(T Value)
258
258
  /// kept up to date. They are also significantly more memory intensive.
259
259
  template <unsigned ElementSize = 128> struct SparseBitVectorElement
260
260
  {
261
- friend class SVFIRWriter;
262
- friend class SVFIRReader;
263
261
 
264
262
  public:
265
263
  using BitWord = unsigned long;
@@ -500,8 +498,6 @@ public:
500
498
  template <unsigned ElementSize = 128>
501
499
  class SparseBitVector
502
500
  {
503
- friend class SVFIRWriter;
504
- friend class SVFIRReader;
505
501
 
506
502
  using ElementList = std::list<SparseBitVectorElement<ElementSize>>;
507
503
  using ElementListIter = typename ElementList::iterator;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "svf-lib",
3
- "version": "1.0.2427",
3
+ "version": "1.0.2429",
4
4
  "description": "SVF's npm support",
5
5
  "main": "index.js",
6
6
  "scripts": {