svf-tools 1.0.694 → 1.0.695
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/CMakeLists.txt +3 -0
- package/package.json +1 -1
- package/svf/include/Graphs/CHG.h +4 -1
- package/svf/include/Graphs/GenericGraph.h +5 -0
- package/svf/include/Graphs/ICFG.h +1 -0
- package/svf/include/Graphs/ICFGEdge.h +4 -0
- package/svf/include/Graphs/ICFGNode.h +28 -2
- package/svf/include/Graphs/IRGraph.h +1 -0
- package/svf/include/MemoryModel/LocationSet.h +1 -0
- package/svf/include/MemoryModel/SVFLoop.h +1 -0
- package/svf/include/SVFIR/SVFIR.h +1 -0
- package/svf/include/SVFIR/SVFIRRW.h +864 -186
- package/svf/include/SVFIR/SVFModule.h +1 -0
- package/svf/include/SVFIR/SVFModuleRW.h +2 -2
- package/svf/include/SVFIR/SVFStatements.h +65 -15
- package/svf/include/SVFIR/SVFType.h +4 -0
- package/svf/include/SVFIR/SVFValue.h +22 -0
- package/svf/include/SVFIR/SVFVariables.h +42 -0
- package/svf/include/SVFIR/SymbolTableInfo.h +17 -1
- package/svf/include/Util/Options.h +1 -0
- package/svf/include/Util/SVFUtil.h +49 -0
- package/svf/include/Util/SparseBitVector.h +2 -0
- package/svf/lib/SVFIR/SVFIRRW.cpp +1509 -127
- package/svf/lib/SVFIR/SVFModuleRW.cpp +6 -6
- package/svf/lib/SVFIR/SymbolTableInfo.cpp +1 -1
- package/svf/lib/Util/Options.cpp +7 -1
- package/svf-llvm/lib/LLVMModule.cpp +1 -1
- package/svf-llvm/lib/SVFIRBuilder.cpp +1 -1
- package/svf-llvm/tools/WPA/wpa.cpp +17 -14
|
@@ -654,6 +654,55 @@ move(T &&t) noexcept
|
|
|
654
654
|
return std::move(t);
|
|
655
655
|
}
|
|
656
656
|
|
|
657
|
+
/// void_t is not avaiable until C++17. We define it here for C++11/14.
|
|
658
|
+
template <typename... Ts> struct make_void
|
|
659
|
+
{
|
|
660
|
+
typedef void type;
|
|
661
|
+
};
|
|
662
|
+
template <typename... Ts> using void_t = typename make_void<Ts...>::type;
|
|
663
|
+
|
|
664
|
+
/// @brief Type trait that checks if a type is iterable
|
|
665
|
+
/// (can be applied on a range-based for loop)
|
|
666
|
+
///@{
|
|
667
|
+
template <typename T, typename = void> struct is_iterable : std::false_type {};
|
|
668
|
+
template <typename T>
|
|
669
|
+
struct is_iterable<T, void_t<decltype(std::begin(std::declval<T&>()) !=
|
|
670
|
+
std::end(std::declval<T&>()))>>
|
|
671
|
+
: std::true_type {};
|
|
672
|
+
template <typename T> constexpr bool is_iterable_v = is_iterable<T>::value;
|
|
673
|
+
///@}
|
|
674
|
+
|
|
675
|
+
/// @brief Type trait to check if a type is a map or unordered_map.
|
|
676
|
+
///@{
|
|
677
|
+
template <typename T> struct is_map : std::false_type {};
|
|
678
|
+
template <typename... Ts> struct is_map<std::map<Ts...>> : std::true_type {};
|
|
679
|
+
template <typename... Ts>
|
|
680
|
+
struct is_map<std::unordered_map<Ts...>> : std::true_type {};
|
|
681
|
+
template <typename... Ts> constexpr bool is_map_v = is_map<Ts...>::value;
|
|
682
|
+
///@}
|
|
683
|
+
|
|
684
|
+
/// @brief Type trait to check if a type is a set or unordered_set.
|
|
685
|
+
///@{
|
|
686
|
+
template <typename T> struct is_set : std::false_type {};
|
|
687
|
+
template <typename... Ts> struct is_set<std::set<Ts...>> : std::true_type {};
|
|
688
|
+
template <typename... Ts>
|
|
689
|
+
struct is_set<std::unordered_set<Ts...>> : std::true_type {};
|
|
690
|
+
template <typename... Ts> constexpr bool is_set_v = is_set<Ts...>::value;
|
|
691
|
+
///@}
|
|
692
|
+
|
|
693
|
+
/// @brief Type trait to check if a type is vector or list.
|
|
694
|
+
template <typename T> struct is_sequence_container : std::false_type {};
|
|
695
|
+
template <typename... Ts>
|
|
696
|
+
struct is_sequence_container<std::vector<Ts...>> : std::true_type {};
|
|
697
|
+
template <typename... Ts>
|
|
698
|
+
struct is_sequence_container<std::deque<Ts...>> : std::true_type {};
|
|
699
|
+
template <typename... Ts>
|
|
700
|
+
struct is_sequence_container<std::list<Ts...>> : std::true_type {};
|
|
701
|
+
template <typename... Ts>
|
|
702
|
+
constexpr bool is_sequence_container_v = is_sequence_container<Ts...>::value;
|
|
703
|
+
///@}
|
|
704
|
+
|
|
705
|
+
|
|
657
706
|
} // End namespace SVFUtil
|
|
658
707
|
|
|
659
708
|
} // End namespace SVF
|
|
@@ -217,6 +217,7 @@ inline unsigned countPopulation(T Value)
|
|
|
217
217
|
template <unsigned ElementSize = 128> struct SparseBitVectorElement
|
|
218
218
|
{
|
|
219
219
|
friend class SVFIRWriter;
|
|
220
|
+
friend class SVFIRReader;
|
|
220
221
|
|
|
221
222
|
public:
|
|
222
223
|
using BitWord = unsigned long;
|
|
@@ -458,6 +459,7 @@ template <unsigned ElementSize = 128>
|
|
|
458
459
|
class SparseBitVector
|
|
459
460
|
{
|
|
460
461
|
friend class SVFIRWriter;
|
|
462
|
+
friend class SVFIRReader;
|
|
461
463
|
|
|
462
464
|
using ElementList = std::list<SparseBitVectorElement<ElementSize>>;
|
|
463
465
|
using ElementListIter = typename ElementList::iterator;
|