svf-lib 1.0.2369 → 1.0.2371

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.
@@ -357,7 +357,7 @@ public:
357
357
  /// Get call graph node
358
358
  //@{
359
359
 
360
- const CallGraphNode* getCallGraphNode(const std::string& name);
360
+ const CallGraphNode* getCallGraphNode(const std::string& name) const;
361
361
 
362
362
  inline CallGraphNode* getCallGraphNode(NodeID id) const
363
363
  {
@@ -96,7 +96,7 @@ private:
96
96
  ICFG* icfg; // ICFG
97
97
  CommonCHGraph* chgraph; // class hierarchy graph
98
98
  CallSiteSet callSiteSet; /// all the callsites of a program
99
- CallGraph* callGraph; /// call graph
99
+ CallGraph* callGraph; /// Callgraph with direct calls only; no change allowed after init and use callgraph in PointerAnalysis for indirect calls)
100
100
 
101
101
  static std::unique_ptr<SVFIR> pag; ///< Singleton pattern here to enable instance of SVFIR can only be created once.
102
102
  static std::string pagReadFromTxt;
@@ -176,12 +176,8 @@ public:
176
176
  return chgraph;
177
177
  }
178
178
 
179
- /// Set/Get CG
180
- inline void setCallGraph(CallGraph* c)
181
- {
182
- callGraph = c;
183
- }
184
- inline CallGraph* getCallGraph()
179
+ /// Get CG
180
+ inline const CallGraph* getCallGraph()
185
181
  {
186
182
  assert(callGraph && "empty CallGraph! Build SVF IR first!");
187
183
  return callGraph;
Binary file
Binary file
package/llvm_install.sh CHANGED
@@ -14,17 +14,34 @@ LLVMHome="llvm-${LLVMVer}.obj"
14
14
 
15
15
  if [[ $sysOS == "Darwin" ]]
16
16
  then
17
- ln -sf libSvfLLVM.3.2.dylib "$SVFHOME/SVF-osx/lib/libSvfLLVM.3.dylib"
18
- ln -sf libSvfLLVM.3.dylib "$SVFHOME/SVF-osx/lib/libSvfLLVM.dylib"
19
- ln -sf libSvfCore.3.2.dylib "$SVFHOME/SVF-osx/lib/libSvfCore.3.dylib"
20
- ln -sf libSvfCore.3.dylib "$SVFHOME/SVF-osx/lib/libSvfCore.dylib"
17
+ # Create soft links for SvfLLVM
18
+ lib=$(find "$SVFHOME/SVF-osx/lib" -name "libSvfLLVM.*.*.dylib" -type f)
19
+ if [ -n "$lib" ]; then
20
+ filename=$(basename "$lib")
21
+ major_version=$(echo "$filename" | sed -E 's/libSvfLLVM\.([0-9]+)\.[0-9]+\.dylib/\1/')
22
+ minor_version=$(echo "$filename" | sed -E 's/libSvfLLVM\.[0-9]+\.([0-9]+)\.dylib/\1/')
23
+ # Create links for SvfLLVM
24
+ ln -sf "$filename" "$SVFHOME/SVF-osx/lib/libSvfLLVM.$major_version.dylib"
25
+ ln -sf "libSvfLLVM.$major_version.dylib" "$SVFHOME/SVF-osx/lib/libSvfLLVM.dylib"
26
+ # Create links for SvfCore using the same version
27
+ ln -sf "libSvfCore.$major_version.$minor_version.dylib" "$SVFHOME/SVF-osx/lib/libSvfCore.$major_version.dylib"
28
+ ln -sf "libSvfCore.$major_version.dylib" "$SVFHOME/SVF-osx/lib/libSvfCore.dylib"
29
+ fi
21
30
  elif [[ $sysOS == "Linux" ]]
22
31
  then
23
32
  # resume softlink libSvfLLVM.so since npm pack would ignore softlink
24
- ln -sf libSvfLLVM.so.3.2 "$SVFHOME/SVF-linux-${arch}/lib/libSvfLLVM.so.3"
25
- ln -sf libSvfLLVM.so.3 "$SVFHOME/SVF-linux-${arch}/lib/libSvfLLVM.so"
26
- ln -sf libSvfCore.so.3.2 "$SVFHOME/SVF-linux-${arch}/lib/libSvfCore.so.3"
27
- ln -sf libSvfCore.so.3 "$SVFHOME/SVF-linux-${arch}/lib/libSvfCore.so"
33
+ lib=$(find "$SVFHOME/SVF-linux-${arch}/lib" -name "libSvfLLVM.so.*.*" -type f)
34
+ if [ -n "$lib" ]; then
35
+ filename=$(basename "$lib")
36
+ major_version=$(echo "$filename" | sed -E 's/libSvfLLVM\.so\.([0-9]+)\.[0-9]+/\1/')
37
+ minor_version=$(echo "$filename" | sed -E 's/libSvfLLVM\.so\.[0-9]+\.([0-9]+)/\1/')
38
+ # Create links for SvfLLVM
39
+ ln -sf "$filename" "$SVFHOME/SVF-linux-${arch}/lib/libSvfLLVM.so.$major_version"
40
+ ln -sf "libSvfLLVM.so.$major_version" "$SVFHOME/SVF-linux-${arch}/lib/libSvfLLVM.so"
41
+ # Create links for SvfCore using the same version
42
+ ln -sf "libSvfCore.so.$major_version.$minor_version" "$SVFHOME/SVF-linux-${arch}/lib/libSvfCore.so.$major_version"
43
+ ln -sf "libSvfCore.so.$major_version" "$SVFHOME/SVF-linux-${arch}/lib/libSvfCore.so"
44
+ fi
28
45
  fi
29
46
 
30
47
  cd $SVFHOME
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "svf-lib",
3
- "version": "1.0.2369",
3
+ "version": "1.0.2371",
4
4
  "description": "SVF's npm support",
5
5
  "main": "index.js",
6
6
  "scripts": {