svf-lib 1.0.997 → 1.0.1000

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.
@@ -33,6 +33,7 @@
33
33
 
34
34
  #include <system_error>
35
35
  #include <llvm/Support/ToolOutputFile.h>
36
+ #include <llvm/Support/GraphWriter.h> // for graph write
36
37
  #include <llvm/Support/FileSystem.h> // for file open flag
37
38
  #include <llvm/ADT/GraphTraits.h>
38
39
 
@@ -173,11 +173,6 @@ public:
173
173
  return getSVFGNode(getDef(pagNode));
174
174
  }
175
175
 
176
- /// Return the corresponding SVFGNodes to a given llvm::Value.
177
- /// return an empty list, if the no mapping is possible
178
- std::set<const SVFGNode*> fromValue(const llvm::Value* value) const;
179
-
180
-
181
176
  /// Perform statistics
182
177
  void performStat();
183
178
 
@@ -183,7 +183,7 @@ public:
183
183
  //@}
184
184
 
185
185
  /// Return load instruction
186
- inline const LoadStmt* getLoadInst() const
186
+ inline const LoadStmt* getLoadStmt() const
187
187
  {
188
188
  return inst;
189
189
  }
@@ -482,7 +482,7 @@ public:
482
482
  }
483
483
 
484
484
  /// Get store instruction
485
- inline const StoreStmt* getStoreInst() const
485
+ inline const StoreStmt* getStoreStmt() const
486
486
  {
487
487
  return inst;
488
488
  }
@@ -54,7 +54,7 @@ public:
54
54
  CK_FCLOSE /// File close
55
55
  };
56
56
 
57
- typedef llvm::StringMap<CHECKER_TYPE> TDAPIMap;
57
+ typedef Map<std::string, CHECKER_TYPE> TDAPIMap;
58
58
 
59
59
  private:
60
60
  /// API map, from a string to threadAPI type
@@ -3,6 +3,7 @@
3
3
 
4
4
  #include <llvm/IR/Instructions.h>
5
5
  #include <llvm/IR/IntrinsicInst.h>
6
+ #include <llvm/IR/LLVMContext.h>
6
7
  #include <llvm/IR/Metadata.h>
7
8
  #include <llvm/IR/DataLayout.h>
8
9
 
@@ -10,6 +11,9 @@
10
11
 
11
12
  #include <llvm/Support/SourceMgr.h>
12
13
 
14
+ typedef llvm::LLVMContext LLVMContext;
15
+ typedef llvm::Use Use;
16
+
13
17
  typedef llvm::SMDiagnostic SMDiagnostic;
14
18
 
15
19
  typedef llvm::MetadataAsValue MetadataAsValue;
@@ -30,6 +30,7 @@
30
30
  #ifndef INCLUDE_SVF_FE_LLVMMODULE_H_
31
31
  #define INCLUDE_SVF_FE_LLVMMODULE_H_
32
32
 
33
+ #include "SVF-FE/BasicTypes.h"
33
34
  #include "SVF-FE/CPPUtil.h"
34
35
  #include "Util/BasicTypes.h"
35
36
  #include "Util/SVFModule.h"
@@ -53,7 +53,6 @@
53
53
  #include <llvm/Analysis/PostDominators.h>
54
54
  #include <llvm/Analysis/ScalarEvolutionExpressions.h>
55
55
  #include <llvm/ADT/GraphTraits.h> // for Graphtraits
56
- #include <llvm/Support/GraphWriter.h> // for graph write
57
56
  #include <llvm/IR/IRBuilder.h> // for instrument svf.main
58
57
  #include <llvm/Transforms/Utils/Local.h> // for FindDbgAddrUses
59
58
  #include <llvm/IR/DebugInfo.h>
@@ -68,7 +67,6 @@ class BddCond;
68
67
 
69
68
 
70
69
  /// LLVM Basic classes
71
- typedef llvm::LLVMContext LLVMContext;
72
70
  typedef llvm::Type Type;
73
71
  typedef llvm::Function Function;
74
72
  typedef llvm::BasicBlock BasicBlock;
@@ -80,7 +78,6 @@ typedef llvm::GlobalValue GlobalValue;
80
78
  typedef llvm::GlobalVariable GlobalVariable;
81
79
  typedef llvm::Module Module;
82
80
  typedef llvm::User User;
83
- typedef llvm::Use Use;
84
81
  typedef llvm::Loop Loop;
85
82
  typedef llvm::LoopInfo LoopInfo;
86
83
  #if LLVM_VERSION_MAJOR >= 12
@@ -94,7 +91,6 @@ typedef llvm::ModulePass ModulePass;
94
91
  typedef llvm::raw_string_ostream raw_string_ostream;
95
92
  typedef llvm::raw_fd_ostream raw_fd_ostream;
96
93
  typedef llvm::StringRef StringRef;
97
- typedef llvm::ToolOutputFile ToolOutputFile;
98
94
 
99
95
  /// LLVM types
100
96
  typedef llvm::StructType StructType;
@@ -93,8 +93,7 @@ public:
93
93
  private:
94
94
 
95
95
  //Each Function name is mapped to its extf_t
96
- // (hash_map and map are much slower).
97
- llvm::StringMap<extf_t> info;
96
+ Map<std::string, extf_t> info;
98
97
  //A cache of is_ext results for all SVFFunction*'s (hash_map is fastest).
99
98
  Map<const SVFFunction*, bool> isext_cache;
100
99
 
@@ -141,7 +140,7 @@ public:
141
140
  unsigned end = funName.substr(start + 1).find('.');
142
141
  funName = "llvm." + funName.substr(start + 1, end);
143
142
  }
144
- llvm::StringMap<extf_t>::const_iterator it= info.find(funName);
143
+ Map<std::string, extf_t>::const_iterator it= info.find(funName);
145
144
  if(it == info.end())
146
145
  return EFT_OTHER;
147
146
  else
@@ -37,7 +37,6 @@
37
37
 
38
38
  #include <llvm/ADT/SparseBitVector.h> // for points-to
39
39
  #include <llvm/Support/CommandLine.h> // for command line options
40
- #include <llvm/ADT/StringMap.h> // for StringMap
41
40
 
42
41
  #include <iostream>
43
42
  #include <vector>
@@ -129,7 +128,6 @@ template<typename Key, typename Value, typename Hash = Hash<Key>,
129
128
  typedef std::deque<NodeID> NodeDeque;
130
129
  typedef NodeSet EdgeSet;
131
130
  typedef std::vector<u32_t> CallStrCxt;
132
- typedef llvm::StringMap<u32_t> StringMap;
133
131
 
134
132
  typedef unsigned Version;
135
133
  typedef Set<Version> VersionSet;
@@ -67,7 +67,7 @@ public:
67
67
  HARE_PAR_FOR
68
68
  };
69
69
 
70
- typedef llvm::StringMap<TD_TYPE> TDAPIMap;
70
+ typedef Map<std::string, TD_TYPE> TDAPIMap;
71
71
 
72
72
  private:
73
73
  /// API map, from a string to threadAPI type
@@ -333,7 +333,7 @@ public:
333
333
  //@}
334
334
 
335
335
  void performAPIStat(SVFModule* m);
336
- void statInit(llvm::StringMap<u32_t>& tdAPIStatMap);
336
+ void statInit(Map<std::string, u32_t>& tdAPIStatMap);
337
337
  };
338
338
 
339
339
  } // End namespace SVF
Binary file
@@ -33,6 +33,7 @@
33
33
 
34
34
  #include <system_error>
35
35
  #include <llvm/Support/ToolOutputFile.h>
36
+ #include <llvm/Support/GraphWriter.h> // for graph write
36
37
  #include <llvm/Support/FileSystem.h> // for file open flag
37
38
  #include <llvm/ADT/GraphTraits.h>
38
39
 
@@ -173,11 +173,6 @@ public:
173
173
  return getSVFGNode(getDef(pagNode));
174
174
  }
175
175
 
176
- /// Return the corresponding SVFGNodes to a given llvm::Value.
177
- /// return an empty list, if the no mapping is possible
178
- std::set<const SVFGNode*> fromValue(const llvm::Value* value) const;
179
-
180
-
181
176
  /// Perform statistics
182
177
  void performStat();
183
178
 
@@ -183,7 +183,7 @@ public:
183
183
  //@}
184
184
 
185
185
  /// Return load instruction
186
- inline const LoadStmt* getLoadInst() const
186
+ inline const LoadStmt* getLoadStmt() const
187
187
  {
188
188
  return inst;
189
189
  }
@@ -482,7 +482,7 @@ public:
482
482
  }
483
483
 
484
484
  /// Get store instruction
485
- inline const StoreStmt* getStoreInst() const
485
+ inline const StoreStmt* getStoreStmt() const
486
486
  {
487
487
  return inst;
488
488
  }
@@ -54,7 +54,7 @@ public:
54
54
  CK_FCLOSE /// File close
55
55
  };
56
56
 
57
- typedef llvm::StringMap<CHECKER_TYPE> TDAPIMap;
57
+ typedef Map<std::string, CHECKER_TYPE> TDAPIMap;
58
58
 
59
59
  private:
60
60
  /// API map, from a string to threadAPI type
@@ -3,6 +3,7 @@
3
3
 
4
4
  #include <llvm/IR/Instructions.h>
5
5
  #include <llvm/IR/IntrinsicInst.h>
6
+ #include <llvm/IR/LLVMContext.h>
6
7
  #include <llvm/IR/Metadata.h>
7
8
  #include <llvm/IR/DataLayout.h>
8
9
 
@@ -10,6 +11,9 @@
10
11
 
11
12
  #include <llvm/Support/SourceMgr.h>
12
13
 
14
+ typedef llvm::LLVMContext LLVMContext;
15
+ typedef llvm::Use Use;
16
+
13
17
  typedef llvm::SMDiagnostic SMDiagnostic;
14
18
 
15
19
  typedef llvm::MetadataAsValue MetadataAsValue;
@@ -30,6 +30,7 @@
30
30
  #ifndef INCLUDE_SVF_FE_LLVMMODULE_H_
31
31
  #define INCLUDE_SVF_FE_LLVMMODULE_H_
32
32
 
33
+ #include "SVF-FE/BasicTypes.h"
33
34
  #include "SVF-FE/CPPUtil.h"
34
35
  #include "Util/BasicTypes.h"
35
36
  #include "Util/SVFModule.h"
@@ -53,7 +53,6 @@
53
53
  #include <llvm/Analysis/PostDominators.h>
54
54
  #include <llvm/Analysis/ScalarEvolutionExpressions.h>
55
55
  #include <llvm/ADT/GraphTraits.h> // for Graphtraits
56
- #include <llvm/Support/GraphWriter.h> // for graph write
57
56
  #include <llvm/IR/IRBuilder.h> // for instrument svf.main
58
57
  #include <llvm/Transforms/Utils/Local.h> // for FindDbgAddrUses
59
58
  #include <llvm/IR/DebugInfo.h>
@@ -68,7 +67,6 @@ class BddCond;
68
67
 
69
68
 
70
69
  /// LLVM Basic classes
71
- typedef llvm::LLVMContext LLVMContext;
72
70
  typedef llvm::Type Type;
73
71
  typedef llvm::Function Function;
74
72
  typedef llvm::BasicBlock BasicBlock;
@@ -80,7 +78,6 @@ typedef llvm::GlobalValue GlobalValue;
80
78
  typedef llvm::GlobalVariable GlobalVariable;
81
79
  typedef llvm::Module Module;
82
80
  typedef llvm::User User;
83
- typedef llvm::Use Use;
84
81
  typedef llvm::Loop Loop;
85
82
  typedef llvm::LoopInfo LoopInfo;
86
83
  #if LLVM_VERSION_MAJOR >= 12
@@ -94,7 +91,6 @@ typedef llvm::ModulePass ModulePass;
94
91
  typedef llvm::raw_string_ostream raw_string_ostream;
95
92
  typedef llvm::raw_fd_ostream raw_fd_ostream;
96
93
  typedef llvm::StringRef StringRef;
97
- typedef llvm::ToolOutputFile ToolOutputFile;
98
94
 
99
95
  /// LLVM types
100
96
  typedef llvm::StructType StructType;
@@ -93,8 +93,7 @@ public:
93
93
  private:
94
94
 
95
95
  //Each Function name is mapped to its extf_t
96
- // (hash_map and map are much slower).
97
- llvm::StringMap<extf_t> info;
96
+ Map<std::string, extf_t> info;
98
97
  //A cache of is_ext results for all SVFFunction*'s (hash_map is fastest).
99
98
  Map<const SVFFunction*, bool> isext_cache;
100
99
 
@@ -141,7 +140,7 @@ public:
141
140
  unsigned end = funName.substr(start + 1).find('.');
142
141
  funName = "llvm." + funName.substr(start + 1, end);
143
142
  }
144
- llvm::StringMap<extf_t>::const_iterator it= info.find(funName);
143
+ Map<std::string, extf_t>::const_iterator it= info.find(funName);
145
144
  if(it == info.end())
146
145
  return EFT_OTHER;
147
146
  else
@@ -37,7 +37,6 @@
37
37
 
38
38
  #include <llvm/ADT/SparseBitVector.h> // for points-to
39
39
  #include <llvm/Support/CommandLine.h> // for command line options
40
- #include <llvm/ADT/StringMap.h> // for StringMap
41
40
 
42
41
  #include <iostream>
43
42
  #include <vector>
@@ -129,7 +128,6 @@ template<typename Key, typename Value, typename Hash = Hash<Key>,
129
128
  typedef std::deque<NodeID> NodeDeque;
130
129
  typedef NodeSet EdgeSet;
131
130
  typedef std::vector<u32_t> CallStrCxt;
132
- typedef llvm::StringMap<u32_t> StringMap;
133
131
 
134
132
  typedef unsigned Version;
135
133
  typedef Set<Version> VersionSet;
@@ -67,7 +67,7 @@ public:
67
67
  HARE_PAR_FOR
68
68
  };
69
69
 
70
- typedef llvm::StringMap<TD_TYPE> TDAPIMap;
70
+ typedef Map<std::string, TD_TYPE> TDAPIMap;
71
71
 
72
72
  private:
73
73
  /// API map, from a string to threadAPI type
@@ -333,7 +333,7 @@ public:
333
333
  //@}
334
334
 
335
335
  void performAPIStat(SVFModule* m);
336
- void statInit(llvm::StringMap<u32_t>& tdAPIStatMap);
336
+ void statInit(Map<std::string, u32_t>& tdAPIStatMap);
337
337
  };
338
338
 
339
339
  } // End namespace SVF
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "svf-lib",
3
- "version": "1.0.997",
3
+ "version": "1.0.1000",
4
4
  "description": "SVF's npm support",
5
5
  "main": "index.js",
6
6
  "scripts": {