svf-lib 1.0.883 → 1.0.887

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.
Files changed (74) hide show
  1. package/SVF-linux/Release-build/lib/libSvf.a +0 -0
  2. package/SVF-linux/include/DDA/DDAPass.h +2 -14
  3. package/SVF-linux/include/Graphs/GraphPrinter.h +2 -2
  4. package/SVF-linux/include/Graphs/ICFGEdge.h +1 -1
  5. package/SVF-linux/include/Graphs/ICFGNode.h +1 -1
  6. package/SVF-linux/include/Graphs/ICFGStat.h +4 -4
  7. package/SVF-linux/include/Graphs/PTACallGraph.h +2 -2
  8. package/SVF-linux/include/Graphs/VFG.h +1 -1
  9. package/SVF-linux/include/Graphs/VFGEdge.h +1 -1
  10. package/SVF-linux/include/Graphs/VFGNode.h +1 -1
  11. package/SVF-linux/include/MSSA/MemSSA.h +1 -1
  12. package/SVF-linux/include/MTA/MTA.h +0 -8
  13. package/SVF-linux/include/MemoryModel/ConditionalPT.h +2 -3
  14. package/SVF-linux/include/MemoryModel/MutablePointsToDS.h +14 -15
  15. package/SVF-linux/include/MemoryModel/PersistentPointsToCache.h +19 -19
  16. package/SVF-linux/include/MemoryModel/PointerAnalysis.h +1 -1
  17. package/SVF-linux/include/MemoryModel/PointerAnalysisImpl.h +5 -5
  18. package/SVF-linux/include/MemoryModel/SVFStatements.h +1 -1
  19. package/SVF-linux/include/MemoryModel/SVFVariables.h +1 -1
  20. package/SVF-linux/include/MemoryModel/SymbolTableInfo.h +0 -6
  21. package/SVF-linux/include/SABER/SaberCheckerAPI.h +1 -1
  22. package/SVF-linux/include/SVF-FE/BasicTypes.h +19 -0
  23. package/SVF-linux/include/SVF-FE/BreakConstantExpr.h +0 -11
  24. package/SVF-linux/include/SVF-FE/DataFlowUtil.h +0 -6
  25. package/SVF-linux/include/SVF-FE/LLVMUtil.h +15 -5
  26. package/SVF-linux/include/SVF-FE/SVFIRBuilder.h +1 -0
  27. package/SVF-linux/include/Util/BasicTypes.h +1 -15
  28. package/SVF-linux/include/Util/Conditions.h +1 -1
  29. package/SVF-linux/include/Util/CxtStmt.h +7 -3
  30. package/SVF-linux/include/Util/DPItem.h +0 -1
  31. package/SVF-linux/include/Util/ExtAPI.h +4 -2
  32. package/SVF-linux/include/Util/IRAnnotator.h +2 -2
  33. package/SVF-linux/include/Util/SVFBasicTypes.h +21 -3
  34. package/SVF-linux/include/Util/SVFUtil.h +7 -7
  35. package/SVF-linux/include/Util/ThreadAPI.h +1 -1
  36. package/SVF-linux/include/WPA/WPAPass.h +2 -16
  37. package/SVF-osx/Release-build/lib/CUDD/libCudd.a +0 -0
  38. package/SVF-osx/Release-build/lib/libSvf.a +0 -0
  39. package/SVF-osx/include/DDA/DDAPass.h +2 -14
  40. package/SVF-osx/include/Graphs/GraphPrinter.h +2 -2
  41. package/SVF-osx/include/Graphs/ICFGEdge.h +1 -1
  42. package/SVF-osx/include/Graphs/ICFGNode.h +1 -1
  43. package/SVF-osx/include/Graphs/ICFGStat.h +4 -4
  44. package/SVF-osx/include/Graphs/PTACallGraph.h +2 -2
  45. package/SVF-osx/include/Graphs/VFG.h +1 -1
  46. package/SVF-osx/include/Graphs/VFGEdge.h +1 -1
  47. package/SVF-osx/include/Graphs/VFGNode.h +1 -1
  48. package/SVF-osx/include/MSSA/MemSSA.h +1 -1
  49. package/SVF-osx/include/MTA/MTA.h +0 -8
  50. package/SVF-osx/include/MemoryModel/ConditionalPT.h +2 -3
  51. package/SVF-osx/include/MemoryModel/MutablePointsToDS.h +14 -15
  52. package/SVF-osx/include/MemoryModel/PersistentPointsToCache.h +19 -19
  53. package/SVF-osx/include/MemoryModel/PointerAnalysis.h +1 -1
  54. package/SVF-osx/include/MemoryModel/PointerAnalysisImpl.h +5 -5
  55. package/SVF-osx/include/MemoryModel/SVFStatements.h +1 -1
  56. package/SVF-osx/include/MemoryModel/SVFVariables.h +1 -1
  57. package/SVF-osx/include/MemoryModel/SymbolTableInfo.h +0 -6
  58. package/SVF-osx/include/SABER/SaberCheckerAPI.h +1 -1
  59. package/SVF-osx/include/SVF-FE/BasicTypes.h +19 -0
  60. package/SVF-osx/include/SVF-FE/BreakConstantExpr.h +0 -11
  61. package/SVF-osx/include/SVF-FE/DataFlowUtil.h +0 -6
  62. package/SVF-osx/include/SVF-FE/LLVMUtil.h +15 -5
  63. package/SVF-osx/include/SVF-FE/SVFIRBuilder.h +1 -0
  64. package/SVF-osx/include/Util/BasicTypes.h +1 -15
  65. package/SVF-osx/include/Util/Conditions.h +1 -1
  66. package/SVF-osx/include/Util/CxtStmt.h +7 -3
  67. package/SVF-osx/include/Util/DPItem.h +0 -1
  68. package/SVF-osx/include/Util/ExtAPI.h +5 -2
  69. package/SVF-osx/include/Util/IRAnnotator.h +2 -2
  70. package/SVF-osx/include/Util/SVFBasicTypes.h +21 -3
  71. package/SVF-osx/include/Util/SVFUtil.h +7 -7
  72. package/SVF-osx/include/Util/ThreadAPI.h +1 -1
  73. package/SVF-osx/include/WPA/WPAPass.h +2 -16
  74. package/package.json +1 -1
@@ -0,0 +1,19 @@
1
+ #ifndef SVF_FE_BASIC_TYPES_H
2
+ #define SVF_FE_BASIC_TYPES_H
3
+
4
+ #include <llvm/IR/Instructions.h>
5
+ #include <llvm/IR/Metadata.h>
6
+
7
+ #include <llvm/Support/SourceMgr.h>
8
+
9
+ typedef llvm::SMDiagnostic SMDiagnostic;
10
+
11
+ typedef llvm::ExtractValueInst ExtractValueInst;
12
+ typedef llvm::ExtractElementInst ExtractElementInst;
13
+ typedef llvm::MetadataAsValue MetadataAsValue;
14
+ typedef llvm::BlockAddress BlockAddress;
15
+
16
+ typedef llvm::ConstantAggregate ConstantAggregate;
17
+ typedef llvm::ConstantAggregateZero ConstantAggregateZero;
18
+
19
+ #endif // SVF_FE_BASIC_TYPES_H
@@ -42,11 +42,6 @@ public:
42
42
  return "Remove Constant GEP Expressions";
43
43
  }
44
44
  virtual bool runOnModule (Module & M);
45
- virtual void getAnalysisUsage(AnalysisUsage &AU) const
46
- {
47
- // This pass does not modify the control-flow graph of the function
48
- AU.setPreservesCFG();
49
- }
50
45
  };
51
46
 
52
47
 
@@ -92,12 +87,6 @@ public:
92
87
  assert(!fn.isDeclaration() && "external function does not have DF");
93
88
  return &getAnalysis<UnifyFunctionExitNodes>(const_cast<Function&>(fn));
94
89
  }
95
- virtual void getAnalysisUsage(AnalysisUsage &AU) const
96
- {
97
- // This pass does not modify the control-flow graph of the function
98
- AU.addRequired<UnifyFunctionExitNodes>();
99
- AU.addPreserved<BreakConstantGEPs>();
100
- }
101
90
  };
102
91
 
103
92
  } // End namespace SVF
@@ -169,12 +169,6 @@ public:
169
169
  {
170
170
  }
171
171
 
172
- virtual void getAnalysisUsage(AnalysisUsage &AU) const
173
- {
174
- AU.setPreservesAll();
175
- // AU.addRequired<DominanceFrontier>();
176
- }
177
-
178
172
  // virtual bool runOnFunction(Function &m) {
179
173
  // Frontiers.clear();
180
174
  // DF = &getAnalysis<DominanceFrontier>();
@@ -30,7 +30,9 @@
30
30
  #ifndef INCLUDE_SVF_FE_LLVMUTIL_H_
31
31
  #define INCLUDE_SVF_FE_LLVMUTIL_H_
32
32
 
33
+ #include "SVF-FE/BasicTypes.h"
33
34
  #include "Util/SVFUtil.h"
35
+ #include "SVF-FE/BasicTypes.h"
34
36
  #include "Util/BasicTypes.h"
35
37
  #include "Util/ExtAPI.h"
36
38
  #include "Util/ThreadAPI.h"
@@ -416,12 +418,12 @@ inline bool ArgInDeadFunction (const Value * val)
416
418
  /// Return true if this is a program entry function (e.g. main)
417
419
  inline bool isProgEntryFunction (const SVFFunction * fun)
418
420
  {
419
- return fun && fun->getName().str() == "main";
421
+ return fun && fun->getName() == "main";
420
422
  }
421
423
 
422
424
  inline bool isProgEntryFunction (const Function * fun)
423
425
  {
424
- return fun && fun->getName().str() == "main";
426
+ return fun && fun->getName() == "main";
425
427
  }
426
428
 
427
429
  /// Get program entry function from module.
@@ -462,9 +464,9 @@ bool isPtrInDeadFunction (const Value * value);
462
464
  //@{
463
465
  inline bool isProgExitFunction (const SVFFunction * fun)
464
466
  {
465
- return fun && (fun->getName().str() == "exit" ||
466
- fun->getName().str() == "__assert_rtn" ||
467
- fun->getName().str() == "__assert_fail" );
467
+ return fun && (fun->getName() == "exit" ||
468
+ fun->getName() == "__assert_rtn" ||
469
+ fun->getName() == "__assert_fail" );
468
470
  }
469
471
 
470
472
  inline bool isProgExitCall(const CallSite cs)
@@ -636,6 +638,14 @@ bool isIRFile(const std::string &filename);
636
638
  void processArguments(int argc, char **argv, int &arg_num, char **arg_value,
637
639
  std::vector<std::string> &moduleNameVec);
638
640
 
641
+ /// Helper method to get the size of the type from target data layout
642
+ //@{
643
+ u32_t getTypeSizeInBytes(const Type* type);
644
+ u32_t getTypeSizeInBytes(const StructType *sty, u32_t field_index);
645
+ //@}
646
+
647
+ const std::string type2String(const Type* type);
648
+
639
649
  } // End namespace SVFUtil
640
650
 
641
651
  } // End namespace SVF
@@ -32,6 +32,7 @@
32
32
 
33
33
  #include "MemoryModel/SVFIR.h"
34
34
  #include "Util/ExtAPI.h"
35
+ #include "SVF-FE/BasicTypes.h"
35
36
  #include "SVF-FE/ICFGBuilder.h"
36
37
 
37
38
  namespace SVF
@@ -46,7 +46,6 @@
46
46
  #include <llvm/Analysis/CallGraph.h> // call graph
47
47
  #include <llvm/IR/GlobalVariable.h> // for GlobalVariable
48
48
 
49
- #include <llvm/Support/SourceMgr.h> // for SMDiagnostic
50
49
  #include <llvm/Bitcode/BitcodeWriter.h> // for WriteBitcodeToFile
51
50
  #include <llvm/Bitcode/BitcodeReader.h> /// for isBitcode
52
51
  #include <llvm/IRReader/IRReader.h> // IR reader for bit file
@@ -70,7 +69,6 @@ class BddCond;
70
69
 
71
70
 
72
71
  /// LLVM Basic classes
73
- typedef llvm::SMDiagnostic SMDiagnostic;
74
72
  typedef llvm::LLVMContext LLVMContext;
75
73
  typedef llvm::Type Type;
76
74
  typedef llvm::Function Function;
@@ -82,7 +80,6 @@ typedef llvm::GlobalObject GlobalObject;
82
80
  typedef llvm::GlobalValue GlobalValue;
83
81
  typedef llvm::GlobalVariable GlobalVariable;
84
82
  typedef llvm::Module Module;
85
- typedef llvm::CallGraph LLVMCallGraph;
86
83
  typedef llvm::User User;
87
84
  typedef llvm::Use Use;
88
85
  typedef llvm::Loop Loop;
@@ -93,10 +90,8 @@ typedef llvm::LoopInfo LoopInfo;
93
90
  typedef llvm::UnifyFunctionExitNodes UnifyFunctionExitNodes;
94
91
  #endif
95
92
  typedef llvm::ModulePass ModulePass;
96
- typedef llvm::AnalysisUsage AnalysisUsage;
97
93
 
98
94
  /// LLVM outputs
99
- typedef llvm::raw_ostream raw_ostream;
100
95
  typedef llvm::raw_string_ostream raw_string_ostream;
101
96
  typedef llvm::raw_fd_ostream raw_fd_ostream;
102
97
  typedef llvm::StringRef StringRef;
@@ -108,8 +103,6 @@ typedef llvm::ArrayType ArrayType;
108
103
  typedef llvm::PointerType PointerType;
109
104
  typedef llvm::FunctionType FunctionType;
110
105
  typedef llvm::VectorType VectorType;
111
- typedef llvm::MetadataAsValue MetadataAsValue;
112
- typedef llvm::BlockAddress BlockAddress;
113
106
 
114
107
  /// LLVM data layout
115
108
  typedef llvm::DataLayout DataLayout;
@@ -122,8 +115,6 @@ typedef llvm::MemoryLocation MemoryLocation;
122
115
  typedef llvm::Argument Argument;
123
116
  typedef llvm::Constant Constant;
124
117
  typedef llvm::ConstantData ConstantData;
125
- typedef llvm::ConstantAggregate ConstantAggregate;
126
- typedef llvm::ConstantAggregateZero ConstantAggregateZero;
127
118
  typedef llvm::ConstantDataSequential ConstantDataSequential;
128
119
  typedef llvm::ConstantInt ConstantInt;
129
120
  typedef llvm::ConstantFP ConstantFP;
@@ -132,9 +123,6 @@ typedef llvm::ConstantExpr ConstantExpr;
132
123
  typedef llvm::ConstantPointerNull ConstantPointerNull;
133
124
  typedef llvm::ConstantArray ConstantArray;
134
125
  typedef llvm::GlobalAlias GlobalAlias;
135
- typedef llvm::AliasResult AliasResult;
136
- typedef llvm::ModRefInfo ModRefInfo;
137
- typedef llvm::AnalysisID AnalysisID;
138
126
  typedef llvm::ConstantDataArray ConstantDataArray;
139
127
 
140
128
  /// LLVM metadata
@@ -160,13 +148,11 @@ typedef llvm::IntToPtrInst IntToPtrInst;
160
148
  typedef llvm::CmpInst CmpInst;
161
149
  typedef llvm::BranchInst BranchInst;
162
150
  typedef llvm::SwitchInst SwitchInst;
163
- typedef llvm::ExtractValueInst ExtractValueInst;
164
151
  typedef llvm::InsertValueInst InsertValueInst;
165
152
  typedef llvm::BinaryOperator BinaryOperator;
166
153
  typedef llvm::UnaryOperator UnaryOperator;
167
154
  typedef llvm::PtrToIntInst PtrToIntInst;
168
155
  typedef llvm::VAArgInst VAArgInst;
169
- typedef llvm::ExtractElementInst ExtractElementInst;
170
156
  typedef llvm::InsertElementInst InsertElementInst;
171
157
  typedef llvm::ShuffleVectorInst ShuffleVectorInst;
172
158
  typedef llvm::LandingPadInst LandingPadInst;
@@ -332,7 +318,7 @@ public:
332
318
  };
333
319
 
334
320
  template <typename F, typename S>
335
- raw_ostream& operator<< (raw_ostream &o, const std::pair<F, S> &var)
321
+ OutStream& operator<< (OutStream &o, const std::pair<F, S> &var)
336
322
  {
337
323
  o << "<" << var.first << ", " << var.second << ">";
338
324
  return o;
@@ -162,7 +162,7 @@ public:
162
162
  void ddClearFlag(BranchCond * f) const;
163
163
  void BddSupportStep( BranchCond * f, NodeBS &support) const;
164
164
  void extractSubConds( BranchCond * f, NodeBS &support) const;
165
- void dump(BranchCond* lhs, raw_ostream & O);
165
+ void dump(BranchCond* lhs, OutStream & O);
166
166
  std::string dumpStr(BranchCond* lhs) const;
167
167
 
168
168
  private:
@@ -108,7 +108,7 @@ public:
108
108
  /// Dump CxtStmt
109
109
  inline void dump() const
110
110
  {
111
- SVFUtil::outs() << "[ Current Stmt: " << SVFUtil::getSourceLoc(inst) << " " << *inst << "\t Contexts: " << cxtToStr() << " ]\n";
111
+ SVFUtil::outs() << "[ Current Stmt: " << SVFUtil::getSourceLoc(inst) << " " << SVFUtil::value2String(inst) << "\t Contexts: " << cxtToStr() << " ]\n";
112
112
  }
113
113
 
114
114
  protected:
@@ -174,7 +174,7 @@ public:
174
174
  /// Dump CxtThreadStmt
175
175
  inline void dump() const
176
176
  {
177
- SVFUtil::outs() << "[ Current Thread id: " << tid << " Stmt: " << SVFUtil::getSourceLoc(inst) << " " << *inst << "\t Contexts: " << cxtToStr() << " ]\n";
177
+ SVFUtil::outs() << "[ Current Thread id: " << tid << " Stmt: " << SVFUtil::getSourceLoc(inst) << " " << SVFUtil::value2String(inst) << "\t Contexts: " << cxtToStr() << " ]\n";
178
178
  }
179
179
 
180
180
  private:
@@ -281,11 +281,15 @@ public:
281
281
  std::string cycle = incycle?", incycle":"";
282
282
 
283
283
  if(forksite)
284
- SVFUtil::outs() << "[ Thread: $" << SVFUtil::getSourceLoc(forksite) << "$ " << *forksite << "\t Contexts: " << cxtToStr()
284
+ {
285
+ SVFUtil::outs() << "[ Thread: $" << SVFUtil::getSourceLoc(forksite) << "$ " << SVFUtil::value2String(forksite) << "\t Contexts: " << cxtToStr()
285
286
  << loop << cycle <<" ]\n";
287
+ }
286
288
  else
289
+ {
287
290
  SVFUtil::outs() << "[ Thread: " << "main " << "\t Contexts: " << cxtToStr()
288
291
  << loop << cycle <<" ]\n";
292
+ }
289
293
  }
290
294
  protected:
291
295
  CallStrCxt cxt;
@@ -32,7 +32,6 @@
32
32
 
33
33
  #include "Util/Conditions.h"
34
34
  #include "MemoryModel/ConditionalPT.h"
35
- #include "llvm/Support/raw_ostream.h"
36
35
  #include <algorithm> // std::sort
37
36
 
38
37
  namespace SVF
@@ -53,6 +53,7 @@ public:
53
53
  EFT_ALLOC, //returns a ptr to a newly allocated object
54
54
  EFT_REALLOC, //like L_A0 if arg0 is a non-null ptr, else ALLOC
55
55
  EFT_FREE, //free memory arg0 and all pointers passing into free function
56
+ EFT_FREE_MULTILEVEL, //any argument with 2-level pointer passing too a free wrapper function e.g., XFree(void**) which frees memory for void* and void**
56
57
  EFT_NOSTRUCT_ALLOC, //like ALLOC but only allocates non-struct data
57
58
  EFT_STAT, //retval points to an unknown static var X
58
59
  EFT_STAT2, //ret -> X -> Y (X, Y - external static vars)
@@ -133,10 +134,12 @@ public:
133
134
  extf_t get_type(const SVFFunction* F) const
134
135
  {
135
136
  assert(F);
136
- std::string funName = F->getName().str();
137
+ std::string funName = F->getName();
137
138
  if(F->isIntrinsic())
138
139
  {
139
- funName = "llvm." + F->getName().split('.').second.split('.').first.str();
140
+ unsigned start = funName.find('.');
141
+ unsigned end = funName.substr(start + 1).find('.');
142
+ funName = "llvm." + funName.substr(start + 1, end);
140
143
  }
141
144
  llvm::StringMap<extf_t>::const_iterator it= info.find(funName);
142
145
  if(it == info.end())
@@ -138,8 +138,8 @@ private:
138
138
  }
139
139
  else
140
140
  {
141
- std::cout << "Value is NOT a Instruction, Argument, Function, GlobalVariable, BasicBlock, Constant or InlineAsm" << std::endl;
142
- SVFUtil::outs() << *value << "\n";
141
+ SVFUtil::outs() << "Value is NOT a Instruction, Argument, Function, GlobalVariable, BasicBlock, Constant or InlineAsm" << std::endl;
142
+ SVFUtil::outs() << SVFUtil::value2String(value) << "\n";
143
143
  }
144
144
  }
145
145
 
@@ -32,10 +32,10 @@
32
32
  #define INCLUDE_UTIL_SVFBASICTYPES_H_
33
33
 
34
34
  #include <llvm/ADT/SparseBitVector.h> // for points-to
35
- #include <llvm/Support/raw_ostream.h> // for output
36
35
  #include <llvm/Support/CommandLine.h> // for command line options
37
36
  #include <llvm/ADT/StringMap.h> // for StringMap
38
37
 
38
+ #include <iostream>
39
39
  #include <vector>
40
40
  #include <list>
41
41
  #include <set>
@@ -72,6 +72,8 @@ template <class T> struct Hash {
72
72
  }
73
73
  };
74
74
 
75
+ typedef std::ostream OutStream;
76
+
75
77
  typedef unsigned u32_t;
76
78
  typedef signed s32_t;
77
79
  typedef unsigned long long u64_t;
@@ -179,6 +181,22 @@ template <> struct Hash<NodePair>
179
181
  /// Size of native integer that we'll use for bit vectors, in bits.
180
182
  #define NATIVE_INT_SIZE (sizeof(unsigned long long) * CHAR_BIT)
181
183
 
184
+ enum ModRefInfo
185
+ {
186
+ ModRef,
187
+ Ref,
188
+ Mod,
189
+ NoModRef,
190
+ };
191
+
192
+ enum AliasResult
193
+ {
194
+ MustAlias,
195
+ MayAlias,
196
+ PartialAlias,
197
+ NoAlias,
198
+ };
199
+
182
200
  class SVFValue
183
201
  {
184
202
 
@@ -228,7 +246,7 @@ public:
228
246
  }
229
247
  //@}
230
248
 
231
- const llvm::StringRef getName() const
249
+ const std::string getName() const
232
250
  {
233
251
  return value;
234
252
  }
@@ -240,7 +258,7 @@ public:
240
258
 
241
259
  /// Overloading operator << for dumping ICFG node ID
242
260
  //@{
243
- friend llvm::raw_ostream& operator<< (llvm::raw_ostream &o, const SVFValue &node)
261
+ friend OutStream& operator<< (OutStream &o, const SVFValue &node)
244
262
  {
245
263
  o << node.getName();
246
264
  return o;
@@ -46,20 +46,20 @@ namespace SVFUtil
46
46
  {
47
47
 
48
48
  /// Overwrite llvm::outs()
49
- inline raw_ostream &outs()
49
+ inline std::ostream &outs()
50
50
  {
51
- return llvm::outs();
51
+ return std::cout;
52
52
  }
53
53
 
54
54
  /// Overwrite llvm::errs()
55
- inline raw_ostream &errs()
55
+ inline std::ostream &errs()
56
56
  {
57
- return llvm::errs();
57
+ return std::cerr;
58
58
  }
59
59
 
60
60
  /// Dump sparse bitvector set
61
- void dumpSet(NodeBS To, raw_ostream & O = SVFUtil::outs());
62
- void dumpSet(PointsTo To, raw_ostream & O = SVFUtil::outs());
61
+ void dumpSet(NodeBS To, OutStream & O = SVFUtil::outs());
62
+ void dumpSet(PointsTo To, OutStream & O = SVFUtil::outs());
63
63
 
64
64
  /// Dump points-to set
65
65
  void dumpPointsToSet(unsigned node, NodeBS To) ;
@@ -89,7 +89,7 @@ std::string bugMsg3(std::string msg);
89
89
  std::string pasMsg(std::string msg);
90
90
 
91
91
  /// Print memory usage in KB.
92
- void reportMemoryUsageKB(const std::string& infor, raw_ostream & O = SVFUtil::outs());
92
+ void reportMemoryUsageKB(const std::string& infor, OutStream & O = SVFUtil::outs());
93
93
 
94
94
  /// Get memory usage from system file. Return TRUE if succeed.
95
95
  bool getMemoryUsageKB(u32_t* vmrss_kb, u32_t* vmsize_kb);
@@ -90,7 +90,7 @@ private:
90
90
  {
91
91
  if(F)
92
92
  {
93
- TDAPIMap::const_iterator it= tdAPIMap.find(F->getName().str());
93
+ TDAPIMap::const_iterator it= tdAPIMap.find(F->getName());
94
94
  if(it != tdAPIMap.end())
95
95
  return it->second;
96
96
  }
@@ -51,7 +51,7 @@ class SVFG;
51
51
  */
52
52
  // excised ", public llvm::AliasAnalysis" as that has a very light interface
53
53
  // and I want to see what breaks.
54
- class WPAPass : public ModulePass
54
+ class WPAPass
55
55
  {
56
56
  typedef std::vector<PointerAnalysis*> PTAVector;
57
57
 
@@ -67,7 +67,7 @@ public:
67
67
  };
68
68
 
69
69
  /// Constructor needs TargetLibraryInfo to be passed to the AliasAnalysis
70
- WPAPass() : ModulePass(ID)
70
+ WPAPass()
71
71
  {
72
72
 
73
73
  }
@@ -75,20 +75,6 @@ public:
75
75
  /// Destructor
76
76
  virtual ~WPAPass();
77
77
 
78
- /// LLVM analysis usage
79
- virtual inline void getAnalysisUsage(AnalysisUsage &au) const
80
- {
81
- // declare your dependencies here.
82
- /// do not intend to change the IR in this pass,
83
- au.setPreservesAll();
84
- }
85
-
86
- /// Get adjusted analysis for alias analysis
87
- virtual inline void* getAdjustedAnalysisPointer(AnalysisID)
88
- {
89
- return this;
90
- }
91
-
92
78
  /// Interface expose to users of our pointer analysis, given Location infos
93
79
  virtual inline AliasResult alias(const MemoryLocation &LocA, const MemoryLocation &LocB)
94
80
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "svf-lib",
3
- "version": "1.0.883",
3
+ "version": "1.0.887",
4
4
  "description": "SVF's npm support",
5
5
  "main": "index.js",
6
6
  "scripts": {