svf-lib 1.0.2266 → 1.0.2267
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.
- package/SVF-osx/Release-build/include/CFL/CFGrammar.h +7 -7
- package/SVF-osx/Release-build/include/CFL/CFLGraphBuilder.h +2 -4
- package/SVF-osx/Release-build/include/Graphs/WTO.h +2 -2
- package/SVF-osx/Release-build/include/SVF-LLVM/DCHG.h +1 -2
- package/SVF-osx/Release-build/include/SVFIR/SVFStatements.h +2 -4
- package/SVF-osx/Release-build/include/Util/Casting.h +6 -6
- package/SVF-osx/Release-build/include/Util/GeneralType.h +26 -26
- package/SVF-osx/Release-build/include/Util/SVFUtil.h +1 -1
- package/SVF-osx/Release-build/lib/libSvfLLVM.dylib +0 -0
- package/package.json +1 -1
|
@@ -147,17 +147,17 @@ public:
|
|
|
147
147
|
template<typename Key, typename Value, typename Hash = SymbolHash,
|
|
148
148
|
typename KeyEqual = std::equal_to<Key>,
|
|
149
149
|
typename Allocator = std::allocator<std::pair<const Key, Value>>>
|
|
150
|
-
|
|
150
|
+
using SymbolMap = std::unordered_map<Key, Value, Hash, KeyEqual, Allocator>;
|
|
151
151
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
152
|
+
template <typename Key, typename Hash = SymbolVectorHash, typename KeyEqual = std::equal_to<Key>,
|
|
153
|
+
typename Allocator = std::allocator<Key>>
|
|
154
|
+
using SymbolSet = std::unordered_set<Key, Hash, KeyEqual, Allocator>;
|
|
155
155
|
|
|
156
|
-
|
|
157
|
-
|
|
156
|
+
typedef std::vector<Symbol> Production;
|
|
157
|
+
typedef SymbolSet<Production> Productions;
|
|
158
158
|
|
|
159
159
|
|
|
160
|
-
|
|
160
|
+
inline Map<std::string, Kind>& getNonterminals()
|
|
161
161
|
{
|
|
162
162
|
return this->nonterminals;
|
|
163
163
|
}
|
|
@@ -117,8 +117,7 @@ public:
|
|
|
117
117
|
};
|
|
118
118
|
|
|
119
119
|
/// AliasCFLGraphBuilder: a CFLGraphBuilder specialized for handling aliasing
|
|
120
|
-
class AliasCFLGraphBuilder :
|
|
121
|
-
public CFLGraphBuilder
|
|
120
|
+
class AliasCFLGraphBuilder : public CFLGraphBuilder
|
|
122
121
|
{
|
|
123
122
|
public:
|
|
124
123
|
/// Builds a bidirectional CFL graph by copying nodes and edges from a const graph that inherits from GenericGraph
|
|
@@ -140,8 +139,7 @@ private:
|
|
|
140
139
|
};
|
|
141
140
|
|
|
142
141
|
/// VFCFLGraphBuilder: a CFLGraphBuilder specialized for handling value-flow
|
|
143
|
-
class VFCFLGraphBuilder :
|
|
144
|
-
public CFLGraphBuilder
|
|
142
|
+
class VFCFLGraphBuilder : public CFLGraphBuilder
|
|
145
143
|
{
|
|
146
144
|
public:
|
|
147
145
|
/// Builds a bidirectional CFL graph by copying nodes and edges from a const graph that inherits from SVFG
|
|
@@ -494,7 +494,7 @@ public:
|
|
|
494
494
|
|
|
495
495
|
/// Copy assignment operator
|
|
496
496
|
WTOComponentVisitor& operator=(const WTOComponentVisitor&) noexcept =
|
|
497
|
-
|
|
497
|
+
default;
|
|
498
498
|
|
|
499
499
|
/// Move assignment operator
|
|
500
500
|
WTOComponentVisitor& operator=(WTOComponentVisitor&&) noexcept = default;
|
|
@@ -702,7 +702,7 @@ protected:
|
|
|
702
702
|
WTOCycleDepthPtr previous_cycleDepth = _wtoCycleDepth;
|
|
703
703
|
_nodeToWTOCycleDepth.insert(std::make_pair(head, _wtoCycleDepth));
|
|
704
704
|
_wtoCycleDepth =
|
|
705
|
-
|
|
705
|
+
std::make_shared<GraphTWTOCycleDepth>(*_wtoCycleDepth);
|
|
706
706
|
_wtoCycleDepth->add(head);
|
|
707
707
|
for (auto it = cycle.begin(), et = cycle.end(); it != et; ++it)
|
|
708
708
|
{
|
|
@@ -203,8 +203,7 @@ private:
|
|
|
203
203
|
};
|
|
204
204
|
|
|
205
205
|
/// Dwarf based CHG.
|
|
206
|
-
class DCHGraph :
|
|
207
|
-
public CommonCHGraph, public GenericGraph<DCHNode, DCHEdge>
|
|
206
|
+
class DCHGraph : public CommonCHGraph, public GenericGraph<DCHNode, DCHEdge>
|
|
208
207
|
{
|
|
209
208
|
public:
|
|
210
209
|
/// Returns the DIType beneath the qualifiers. Does not strip away "DW_TAG_members".
|
|
@@ -1244,8 +1244,7 @@ public:
|
|
|
1244
1244
|
/*!
|
|
1245
1245
|
* Thread Fork
|
|
1246
1246
|
*/
|
|
1247
|
-
class TDForkPE:
|
|
1248
|
-
public CallPE
|
|
1247
|
+
class TDForkPE: public CallPE
|
|
1249
1248
|
{
|
|
1250
1249
|
friend class SVFIRWriter;
|
|
1251
1250
|
friend class SVFIRReader;
|
|
@@ -1286,8 +1285,7 @@ public:
|
|
|
1286
1285
|
/*!
|
|
1287
1286
|
* Thread Join
|
|
1288
1287
|
*/
|
|
1289
|
-
class TDJoinPE:
|
|
1290
|
-
public RetPE
|
|
1288
|
+
class TDJoinPE: public RetPE
|
|
1291
1289
|
{
|
|
1292
1290
|
friend class SVFIRWriter;
|
|
1293
1291
|
friend class SVFIRReader;
|
|
@@ -217,8 +217,8 @@ struct isa_impl_wrap
|
|
|
217
217
|
static bool doit(const From &Val)
|
|
218
218
|
{
|
|
219
219
|
return isa_impl_wrap<To, SimpleFrom,
|
|
220
|
-
|
|
221
|
-
|
|
220
|
+
typename simplify_type<SimpleFrom>::SimpleType>::doit(
|
|
221
|
+
simplify_type<const From>::getSimplifiedValue(Val));
|
|
222
222
|
}
|
|
223
223
|
};
|
|
224
224
|
|
|
@@ -285,11 +285,11 @@ template<class To, class From> struct cast_retty_impl<To, const From*const>
|
|
|
285
285
|
template <class To, class From>
|
|
286
286
|
struct cast_retty_impl<To, std::unique_ptr<From>>
|
|
287
287
|
{
|
|
288
|
-
|
|
288
|
+
private:
|
|
289
289
|
using PointerType = typename cast_retty_impl<To, From *>::ret_type;
|
|
290
290
|
using ResultType = typename std::remove_pointer<PointerType>::type;
|
|
291
291
|
|
|
292
|
-
|
|
292
|
+
public:
|
|
293
293
|
using ret_type = std::unique_ptr<ResultType>;
|
|
294
294
|
};
|
|
295
295
|
|
|
@@ -325,8 +325,8 @@ template<class To, class From, class SimpleFrom> struct cast_convert_val
|
|
|
325
325
|
static typename cast_retty<To, From>::ret_type doit(From &Val)
|
|
326
326
|
{
|
|
327
327
|
return cast_convert_val<To, SimpleFrom,
|
|
328
|
-
|
|
329
|
-
|
|
328
|
+
typename simplify_type<SimpleFrom>::SimpleType>::doit(
|
|
329
|
+
simplify_type<From>::getSimplifiedValue(Val));
|
|
330
330
|
}
|
|
331
331
|
};
|
|
332
332
|
|
|
@@ -98,30 +98,30 @@ using Set = std::unordered_set<Key, Hash, KeyEqual, Allocator>;
|
|
|
98
98
|
template <typename Key, typename Value, typename Hash = Hash<Key>,
|
|
99
99
|
typename KeyEqual = std::equal_to<Key>,
|
|
100
100
|
typename Allocator = std::allocator<std::pair<const Key, Value>>>
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
101
|
+
using Map = std::unordered_map<Key, Value, Hash, KeyEqual, Allocator>;
|
|
102
|
+
|
|
103
|
+
template <typename Key, typename Compare = std::less<Key>,
|
|
104
|
+
typename Allocator = std::allocator<Key>>
|
|
105
|
+
using OrderedSet = std::set<Key, Compare, Allocator>;
|
|
106
|
+
|
|
107
|
+
template <typename Key, typename Value, typename Compare = std::less<Key>,
|
|
108
|
+
typename Allocator = std::allocator<std::pair<const Key, Value>>>
|
|
109
|
+
using OrderedMap = std::map<Key, Value, Compare, Allocator>;
|
|
110
|
+
|
|
111
|
+
typedef std::pair<NodeID, NodeID> NodePair;
|
|
112
|
+
typedef OrderedSet<NodeID> OrderedNodeSet;
|
|
113
|
+
typedef Set<NodeID> NodeSet;
|
|
114
|
+
typedef Set<NodePair> NodePairSet;
|
|
115
|
+
typedef Map<NodePair, NodeID> NodePairMap;
|
|
116
|
+
typedef std::vector<NodeID> NodeVector;
|
|
117
|
+
typedef std::vector<EdgeID> EdgeVector;
|
|
118
|
+
typedef std::stack<NodeID> NodeStack;
|
|
119
|
+
typedef std::list<NodeID> NodeList;
|
|
120
|
+
typedef std::deque<NodeID> NodeDeque;
|
|
121
|
+
typedef NodeSet EdgeSet;
|
|
122
|
+
typedef std::vector<u32_t> CallStrCxt;
|
|
123
|
+
typedef unsigned Version;
|
|
124
|
+
typedef Set<Version> VersionSet;
|
|
125
|
+
typedef std::pair<NodeID, Version> VersionedVar;
|
|
126
|
+
typedef Set<VersionedVar> VersionedVarSet;
|
|
127
127
|
}
|
|
@@ -436,7 +436,7 @@ template <typename T, typename = void> struct is_iterable : std::false_type {};
|
|
|
436
436
|
template <typename T>
|
|
437
437
|
struct is_iterable<T, void_t<decltype(std::begin(std::declval<T&>()) !=
|
|
438
438
|
std::end(std::declval<T&>()))>>
|
|
439
|
-
|
|
439
|
+
: std::true_type {};
|
|
440
440
|
template <typename T> constexpr bool is_iterable_v = is_iterable<T>::value;
|
|
441
441
|
///@}
|
|
442
442
|
|
|
Binary file
|