svf-lib 1.0.1439 → 1.0.1440

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.
@@ -1,4 +1,4 @@
1
- //===- SVFModule.h -- SVFModule* class-----------------------------------------//
1
+ //===- SVFModule.h -- SVFModule* class----------------------------------------//
2
2
  //
3
3
  // SVF: Static Value-Flow Analysis
4
4
  //
@@ -42,6 +42,7 @@ class SVFModule
42
42
  {
43
43
  friend class SVFModuleWrite;
44
44
  friend class SVFModuleRead;
45
+
45
46
  public:
46
47
  typedef std::vector<const SVFFunction*> FunctionSetType;
47
48
  typedef std::vector<SVFGlobalValue*> GlobalSetType;
@@ -67,14 +68,12 @@ private:
67
68
  FunctionSetType FunctionSet; ///< The Functions in the module
68
69
  GlobalSetType GlobalSet; ///< The Global Variables in the module
69
70
  AliasSetType AliasSet; ///< The Aliases in the module
70
- ConstantType ConstantSet; ///< The ConstantData in the module
71
- OtherValueType OtherValueSet; ///< All other values in the module
71
+ ConstantType ConstantSet; ///< The ConstantData in the module
72
+ OtherValueType OtherValueSet; ///< All other values in the module
72
73
 
73
74
  public:
74
75
  /// Constructors
75
- SVFModule(std::string moduleName = "") : moduleIdentifier(moduleName)
76
- {
77
- }
76
+ SVFModule(std::string moduleName = "") : moduleIdentifier(moduleName) {}
78
77
 
79
78
  ~SVFModule();
80
79
 
@@ -1,3 +1,25 @@
1
+ //===- SVFModuleRW.h -- SVFModuleReader* class--------------------------------//
2
+ //
3
+ // SVF: Static Value-Flow Analysis
4
+ //
5
+ // Copyright (C) <2013-2017> <Yulei Sui>
6
+ //
7
+
8
+ // This program is free software: you can redistribute it and/or modify
9
+ // it under the terms of the GNU Affero General Public License as published by
10
+ // the Free Software Foundation, either version 3 of the License, or
11
+ // (at your option) any later version.
12
+
13
+ // This program is distributed in the hope that it will be useful,
14
+ // but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
+ // GNU Affero General Public License for more details.
17
+
18
+ // You should have received a copy of the GNU Affero General Public License
19
+ // along with this program. If not, see <http://www.gnu.org/licenses/>.
20
+ //
21
+ //===----------------------------------------------------------------------===//
22
+
1
23
  /*
2
24
  * SVFModuleRW.h
3
25
  *
@@ -1,4 +1,4 @@
1
- //===- SVFBasicTypes.h -- Basic types used in SVF-------------------------------//
1
+ //===- SVFBasicTypes.h -- Basic types used in SVF-----------------------------//
2
2
  //
3
3
  // SVF: Static Value-Flow Analysis
4
4
  //
@@ -168,8 +168,11 @@ public:
168
168
  /// Destructor
169
169
  ~StInfo() = default;
170
170
 
171
- /// struct A { int id; int salary; }; struct B { char name[20]; struct A a;} B b;
172
- // OriginalFieldType of b with field_idx 1 : Struct A
171
+ /// struct A { int id; int salary; };
172
+ /// struct B { char name[20]; struct A a;}
173
+ /// B b;
174
+ ///
175
+ /// OriginalFieldType of b with field_idx 1 : Struct A
173
176
  /// FlatternedFieldType of b with field_idx 1 : int
174
177
  //{@
175
178
  const SVFType* getOriginalElemType(u32_t fldIdx) const;
@@ -70,27 +70,28 @@ void dumpSparseSet(const NodeBS& To);
70
70
  void dumpAliasSet(unsigned node, NodeBS To) ;
71
71
 
72
72
  /// Returns successful message by converting a string into green string output
73
- std::string sucMsg(std::string msg);
73
+ std::string sucMsg(const std::string& msg);
74
74
 
75
75
  /// Returns warning message by converting a string into yellow string output
76
- std::string wrnMsg(std::string msg);
76
+ std::string wrnMsg(const std::string& msg);
77
77
 
78
78
  /// Writes a message run through wrnMsg.
79
- void writeWrnMsg(std::string msg);
79
+ void writeWrnMsg(const std::string& msg);
80
80
 
81
81
  /// Print error message by converting a string into red string output
82
82
  //@{
83
- std::string errMsg(std::string msg);
84
- std::string bugMsg1(std::string msg);
85
- std::string bugMsg2(std::string msg);
86
- std::string bugMsg3(std::string msg);
83
+ std::string errMsg(const std::string& msg);
84
+ std::string bugMsg1(const std::string& msg);
85
+ std::string bugMsg2(const std::string& msg);
86
+ std::string bugMsg3(const std::string& msg);
87
87
  //@}
88
88
 
89
89
  /// Print each pass/phase message by converting a string into blue string output
90
- std::string pasMsg(std::string msg);
90
+ std::string pasMsg(const std::string& msg);
91
91
 
92
92
  /// Print memory usage in KB.
93
- void reportMemoryUsageKB(const std::string& infor, OutStream & O = SVFUtil::outs());
93
+ void reportMemoryUsageKB(const std::string& infor,
94
+ OutStream& O = SVFUtil::outs());
94
95
 
95
96
  /// Get memory usage from system file. Return TRUE if succeed.
96
97
  bool getMemoryUsageKB(u32_t* vmrss_kb, u32_t* vmsize_kb);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "svf-lib",
3
- "version": "1.0.1439",
3
+ "version": "1.0.1440",
4
4
  "description": "SVF's npm support",
5
5
  "main": "index.js",
6
6
  "scripts": {