svf-lib 1.0.2659 → 1.0.2661
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.
|
@@ -81,7 +81,7 @@ if(NOT CMAKE_VERSION VERSION_LESS "3.23.0")
|
|
|
81
81
|
FILE_SET "HEADERS"
|
|
82
82
|
TYPE "HEADERS"
|
|
83
83
|
BASE_DIRS "${_IMPORT_PREFIX}/include"
|
|
84
|
-
FILES "${_IMPORT_PREFIX}/include/AE/Core/AbstractState.h" "${_IMPORT_PREFIX}/include/AE/Core/AbstractValue.h" "${_IMPORT_PREFIX}/include/AE/Core/AddressValue.h" "${_IMPORT_PREFIX}/include/AE/Core/ICFGWTO.h" "${_IMPORT_PREFIX}/include/AE/Core/IntervalValue.h" "${_IMPORT_PREFIX}/include/AE/Core/NumericValue.h" "${_IMPORT_PREFIX}/include/AE/Core/RelExeState.h" "${_IMPORT_PREFIX}/include/AE/Core/RelationSolver.h" "${_IMPORT_PREFIX}/include/AE/Svfexe/AEDetector.h" "${_IMPORT_PREFIX}/include/AE/Svfexe/AEStat.h" "${_IMPORT_PREFIX}/include/AE/Svfexe/AEWTO.h" "${_IMPORT_PREFIX}/include/AE/Svfexe/AbsExtAPI.h" "${_IMPORT_PREFIX}/include/AE/Svfexe/AbstractInterpretation.h" "${_IMPORT_PREFIX}/include/AE/Svfexe/SparseAbstractInterpretation.h" "${_IMPORT_PREFIX}/include/CFL/CFGNormalizer.h" "${_IMPORT_PREFIX}/include/CFL/CFGrammar.h" "${_IMPORT_PREFIX}/include/CFL/CFLAlias.h" "${_IMPORT_PREFIX}/include/CFL/CFLBase.h" "${_IMPORT_PREFIX}/include/CFL/CFLGramGraphChecker.h" "${_IMPORT_PREFIX}/include/CFL/CFLGraphBuilder.h" "${_IMPORT_PREFIX}/include/CFL/CFLSVFGBuilder.h" "${_IMPORT_PREFIX}/include/CFL/CFLSolver.h" "${_IMPORT_PREFIX}/include/CFL/CFLStat.h" "${_IMPORT_PREFIX}/include/CFL/CFLVF.h" "${_IMPORT_PREFIX}/include/CFL/GrammarBuilder.h" "${_IMPORT_PREFIX}/include/DDA/ContextDDA.h" "${_IMPORT_PREFIX}/include/DDA/DDAClient.h" "${_IMPORT_PREFIX}/include/DDA/DDAPass.h" "${_IMPORT_PREFIX}/include/DDA/DDAStat.h" "${_IMPORT_PREFIX}/include/DDA/DDAVFSolver.h" "${_IMPORT_PREFIX}/include/DDA/FlowDDA.h" "${_IMPORT_PREFIX}/include/FastCluster/fastcluster.h" "${_IMPORT_PREFIX}/include/Graphs/BasicBlockG.h" "${_IMPORT_PREFIX}/include/Graphs/CDG.h" "${_IMPORT_PREFIX}/include/Graphs/CFLGraph.h" "${_IMPORT_PREFIX}/include/Graphs/CHG.h" "${_IMPORT_PREFIX}/include/Graphs/CallGraph.h" "${_IMPORT_PREFIX}/include/Graphs/ConsG.h" "${_IMPORT_PREFIX}/include/Graphs/ConsGEdge.h" "${_IMPORT_PREFIX}/include/Graphs/ConsGNode.h" "${_IMPORT_PREFIX}/include/Graphs/DOTGraphTraits.h" "${_IMPORT_PREFIX}/include/Graphs/GenericGraph.h" "${_IMPORT_PREFIX}/include/Graphs/GraphPrinter.h" "${_IMPORT_PREFIX}/include/Graphs/GraphTraits.h" "${_IMPORT_PREFIX}/include/Graphs/GraphWriter.h" "${_IMPORT_PREFIX}/include/Graphs/ICFG.h" "${_IMPORT_PREFIX}/include/Graphs/ICFGEdge.h" "${_IMPORT_PREFIX}/include/Graphs/ICFGNode.h" "${_IMPORT_PREFIX}/include/Graphs/ICFGStat.h" "${_IMPORT_PREFIX}/include/Graphs/IRGraph.h" "${_IMPORT_PREFIX}/include/Graphs/SCC.h" "${_IMPORT_PREFIX}/include/Graphs/SVFG.h" "${_IMPORT_PREFIX}/include/Graphs/SVFGEdge.h" "${_IMPORT_PREFIX}/include/Graphs/SVFGNode.h" "${_IMPORT_PREFIX}/include/Graphs/SVFGOPT.h" "${_IMPORT_PREFIX}/include/Graphs/SVFGStat.h" "${_IMPORT_PREFIX}/include/Graphs/ThreadCallGraph.h" "${_IMPORT_PREFIX}/include/Graphs/VFG.h" "${_IMPORT_PREFIX}/include/Graphs/VFGEdge.h" "${_IMPORT_PREFIX}/include/Graphs/VFGNode.h" "${_IMPORT_PREFIX}/include/Graphs/WTO.h" "${_IMPORT_PREFIX}/include/MSSA/MSSAMuChi.h" "${_IMPORT_PREFIX}/include/MSSA/MemPartition.h" "${_IMPORT_PREFIX}/include/MSSA/MemRegion.h" "${_IMPORT_PREFIX}/include/MSSA/MemSSA.h" "${_IMPORT_PREFIX}/include/MSSA/SVFGBuilder.h" "${_IMPORT_PREFIX}/include/MTA/LockAnalysis.h" "${_IMPORT_PREFIX}/include/MTA/MHP.h" "${_IMPORT_PREFIX}/include/MTA/MTA.h" "${_IMPORT_PREFIX}/include/MTA/MTAStat.h" "${_IMPORT_PREFIX}/include/MTA/TCT.h" "${_IMPORT_PREFIX}/include/MemoryModel/AbstractPointsToDS.h" "${_IMPORT_PREFIX}/include/MemoryModel/AccessPath.h" "${_IMPORT_PREFIX}/include/MemoryModel/ConditionalPT.h" "${_IMPORT_PREFIX}/include/MemoryModel/MutablePointsToDS.h" "${_IMPORT_PREFIX}/include/MemoryModel/PTATY.h" "${_IMPORT_PREFIX}/include/MemoryModel/PersistentPointsToCache.h" "${_IMPORT_PREFIX}/include/MemoryModel/PersistentPointsToDS.h" "${_IMPORT_PREFIX}/include/MemoryModel/PointerAnalysis.h" "${_IMPORT_PREFIX}/include/MemoryModel/PointerAnalysisImpl.h" "${_IMPORT_PREFIX}/include/MemoryModel/PointsTo.h" "${_IMPORT_PREFIX}/include/MemoryModel/SVFLoop.h" "${_IMPORT_PREFIX}/include/SABER/DoubleFreeChecker.h" "${_IMPORT_PREFIX}/include/SABER/FileChecker.h" "${_IMPORT_PREFIX}/include/SABER/LeakChecker.h" "${_IMPORT_PREFIX}/include/SABER/ProgSlice.h" "${_IMPORT_PREFIX}/include/SABER/SaberCheckerAPI.h" "${_IMPORT_PREFIX}/include/SABER/SaberCondAllocator.h" "${_IMPORT_PREFIX}/include/SABER/SaberSVFGBuilder.h" "${_IMPORT_PREFIX}/include/SABER/SrcSnkDDA.h" "${_IMPORT_PREFIX}/include/SABER/SrcSnkSolver.h" "${_IMPORT_PREFIX}/include/SVFIR/ObjTypeInfo.h" "${_IMPORT_PREFIX}/include/SVFIR/PAGBuilderFromFile.h" "${_IMPORT_PREFIX}/include/SVFIR/SVFIR.h" "${_IMPORT_PREFIX}/include/SVFIR/SVFStatements.h" "${_IMPORT_PREFIX}/include/SVFIR/SVFType.h" "${_IMPORT_PREFIX}/include/SVFIR/SVFValue.h" "${_IMPORT_PREFIX}/include/SVFIR/SVFVariables.h" "${_IMPORT_PREFIX}/include/Util/
|
|
84
|
+
FILES "${_IMPORT_PREFIX}/include/AE/Core/AbstractState.h" "${_IMPORT_PREFIX}/include/AE/Core/AbstractValue.h" "${_IMPORT_PREFIX}/include/AE/Core/AddressValue.h" "${_IMPORT_PREFIX}/include/AE/Core/ICFGWTO.h" "${_IMPORT_PREFIX}/include/AE/Core/IntervalValue.h" "${_IMPORT_PREFIX}/include/AE/Core/NumericValue.h" "${_IMPORT_PREFIX}/include/AE/Core/RelExeState.h" "${_IMPORT_PREFIX}/include/AE/Core/RelationSolver.h" "${_IMPORT_PREFIX}/include/AE/Svfexe/AEDetector.h" "${_IMPORT_PREFIX}/include/AE/Svfexe/AEStat.h" "${_IMPORT_PREFIX}/include/AE/Svfexe/AEWTO.h" "${_IMPORT_PREFIX}/include/AE/Svfexe/AbsExtAPI.h" "${_IMPORT_PREFIX}/include/AE/Svfexe/AbstractInterpretation.h" "${_IMPORT_PREFIX}/include/AE/Svfexe/SparseAbstractInterpretation.h" "${_IMPORT_PREFIX}/include/CFL/CFGNormalizer.h" "${_IMPORT_PREFIX}/include/CFL/CFGrammar.h" "${_IMPORT_PREFIX}/include/CFL/CFLAlias.h" "${_IMPORT_PREFIX}/include/CFL/CFLBase.h" "${_IMPORT_PREFIX}/include/CFL/CFLGramGraphChecker.h" "${_IMPORT_PREFIX}/include/CFL/CFLGraphBuilder.h" "${_IMPORT_PREFIX}/include/CFL/CFLSVFGBuilder.h" "${_IMPORT_PREFIX}/include/CFL/CFLSolver.h" "${_IMPORT_PREFIX}/include/CFL/CFLStat.h" "${_IMPORT_PREFIX}/include/CFL/CFLVF.h" "${_IMPORT_PREFIX}/include/CFL/GrammarBuilder.h" "${_IMPORT_PREFIX}/include/DDA/ContextDDA.h" "${_IMPORT_PREFIX}/include/DDA/DDAClient.h" "${_IMPORT_PREFIX}/include/DDA/DDAPass.h" "${_IMPORT_PREFIX}/include/DDA/DDAStat.h" "${_IMPORT_PREFIX}/include/DDA/DDAVFSolver.h" "${_IMPORT_PREFIX}/include/DDA/FlowDDA.h" "${_IMPORT_PREFIX}/include/FastCluster/fastcluster.h" "${_IMPORT_PREFIX}/include/Graphs/BasicBlockG.h" "${_IMPORT_PREFIX}/include/Graphs/CDG.h" "${_IMPORT_PREFIX}/include/Graphs/CFLGraph.h" "${_IMPORT_PREFIX}/include/Graphs/CHG.h" "${_IMPORT_PREFIX}/include/Graphs/CallGraph.h" "${_IMPORT_PREFIX}/include/Graphs/ConsG.h" "${_IMPORT_PREFIX}/include/Graphs/ConsGEdge.h" "${_IMPORT_PREFIX}/include/Graphs/ConsGNode.h" "${_IMPORT_PREFIX}/include/Graphs/DOTGraphTraits.h" "${_IMPORT_PREFIX}/include/Graphs/GenericGraph.h" "${_IMPORT_PREFIX}/include/Graphs/GraphPrinter.h" "${_IMPORT_PREFIX}/include/Graphs/GraphTraits.h" "${_IMPORT_PREFIX}/include/Graphs/GraphWriter.h" "${_IMPORT_PREFIX}/include/Graphs/ICFG.h" "${_IMPORT_PREFIX}/include/Graphs/ICFGEdge.h" "${_IMPORT_PREFIX}/include/Graphs/ICFGNode.h" "${_IMPORT_PREFIX}/include/Graphs/ICFGStat.h" "${_IMPORT_PREFIX}/include/Graphs/IRGraph.h" "${_IMPORT_PREFIX}/include/Graphs/SCC.h" "${_IMPORT_PREFIX}/include/Graphs/SVFG.h" "${_IMPORT_PREFIX}/include/Graphs/SVFGEdge.h" "${_IMPORT_PREFIX}/include/Graphs/SVFGNode.h" "${_IMPORT_PREFIX}/include/Graphs/SVFGOPT.h" "${_IMPORT_PREFIX}/include/Graphs/SVFGStat.h" "${_IMPORT_PREFIX}/include/Graphs/ThreadCallGraph.h" "${_IMPORT_PREFIX}/include/Graphs/VFG.h" "${_IMPORT_PREFIX}/include/Graphs/VFGEdge.h" "${_IMPORT_PREFIX}/include/Graphs/VFGNode.h" "${_IMPORT_PREFIX}/include/Graphs/WTO.h" "${_IMPORT_PREFIX}/include/MSSA/MSSAMuChi.h" "${_IMPORT_PREFIX}/include/MSSA/MemPartition.h" "${_IMPORT_PREFIX}/include/MSSA/MemRegion.h" "${_IMPORT_PREFIX}/include/MSSA/MemSSA.h" "${_IMPORT_PREFIX}/include/MSSA/SVFGBuilder.h" "${_IMPORT_PREFIX}/include/MTA/LockAnalysis.h" "${_IMPORT_PREFIX}/include/MTA/MHP.h" "${_IMPORT_PREFIX}/include/MTA/MTA.h" "${_IMPORT_PREFIX}/include/MTA/MTAStat.h" "${_IMPORT_PREFIX}/include/MTA/TCT.h" "${_IMPORT_PREFIX}/include/MemoryModel/AbstractPointsToDS.h" "${_IMPORT_PREFIX}/include/MemoryModel/AccessPath.h" "${_IMPORT_PREFIX}/include/MemoryModel/ConditionalPT.h" "${_IMPORT_PREFIX}/include/MemoryModel/MutablePointsToDS.h" "${_IMPORT_PREFIX}/include/MemoryModel/PTATY.h" "${_IMPORT_PREFIX}/include/MemoryModel/PersistentPointsToCache.h" "${_IMPORT_PREFIX}/include/MemoryModel/PersistentPointsToDS.h" "${_IMPORT_PREFIX}/include/MemoryModel/PointerAnalysis.h" "${_IMPORT_PREFIX}/include/MemoryModel/PointerAnalysisImpl.h" "${_IMPORT_PREFIX}/include/MemoryModel/PointsTo.h" "${_IMPORT_PREFIX}/include/MemoryModel/SVFLoop.h" "${_IMPORT_PREFIX}/include/SABER/DoubleFreeChecker.h" "${_IMPORT_PREFIX}/include/SABER/FileChecker.h" "${_IMPORT_PREFIX}/include/SABER/LeakChecker.h" "${_IMPORT_PREFIX}/include/SABER/ProgSlice.h" "${_IMPORT_PREFIX}/include/SABER/SaberCheckerAPI.h" "${_IMPORT_PREFIX}/include/SABER/SaberCondAllocator.h" "${_IMPORT_PREFIX}/include/SABER/SaberSVFGBuilder.h" "${_IMPORT_PREFIX}/include/SABER/SrcSnkDDA.h" "${_IMPORT_PREFIX}/include/SABER/SrcSnkSolver.h" "${_IMPORT_PREFIX}/include/SVFIR/ObjTypeInfo.h" "${_IMPORT_PREFIX}/include/SVFIR/PAGBuilderFromFile.h" "${_IMPORT_PREFIX}/include/SVFIR/SVFIR.h" "${_IMPORT_PREFIX}/include/SVFIR/SVFStatements.h" "${_IMPORT_PREFIX}/include/SVFIR/SVFType.h" "${_IMPORT_PREFIX}/include/SVFIR/SVFValue.h" "${_IMPORT_PREFIX}/include/SVFIR/SVFVariables.h" "${_IMPORT_PREFIX}/include/Util/BitVector.h" "${_IMPORT_PREFIX}/include/Util/CDGBuilder.h" "${_IMPORT_PREFIX}/include/Util/CallGraphBuilder.h" "${_IMPORT_PREFIX}/include/Util/Casting.h" "${_IMPORT_PREFIX}/include/Util/CommandLine.h" "${_IMPORT_PREFIX}/include/Util/CoreBitVector.h" "${_IMPORT_PREFIX}/include/Util/CxtStmt.h" "${_IMPORT_PREFIX}/include/Util/DPItem.h" "${_IMPORT_PREFIX}/include/Util/ExtAPI.h" "${_IMPORT_PREFIX}/include/Util/GeneralType.h" "${_IMPORT_PREFIX}/include/Util/GraphReachSolver.h" "${_IMPORT_PREFIX}/include/Util/Hash.h" "${_IMPORT_PREFIX}/include/Util/NodeIDAllocator.h" "${_IMPORT_PREFIX}/include/Util/Options.h" "${_IMPORT_PREFIX}/include/Util/PTAStat.h" "${_IMPORT_PREFIX}/include/Util/SVFBugReport.h" "${_IMPORT_PREFIX}/include/Util/SVFLoopAndDomInfo.h" "${_IMPORT_PREFIX}/include/Util/SVFStat.h" "${_IMPORT_PREFIX}/include/Util/SVFUtil.h" "${_IMPORT_PREFIX}/include/Util/SparseBitVector.h" "${_IMPORT_PREFIX}/include/Util/ThreadAPI.h" "${_IMPORT_PREFIX}/include/Util/WorkList.h" "${_IMPORT_PREFIX}/include/Util/Z3Expr.h" "${_IMPORT_PREFIX}/include/Util/cJSON.h" "${_IMPORT_PREFIX}/include/Util/iterator.h" "${_IMPORT_PREFIX}/include/Util/iterator_range.h" "${_IMPORT_PREFIX}/include/WPA/Andersen.h" "${_IMPORT_PREFIX}/include/WPA/AndersenPWC.h" "${_IMPORT_PREFIX}/include/WPA/CSC.h" "${_IMPORT_PREFIX}/include/WPA/FlowSensitive.h" "${_IMPORT_PREFIX}/include/WPA/Steensgaard.h" "${_IMPORT_PREFIX}/include/WPA/TypeAnalysis.h" "${_IMPORT_PREFIX}/include/WPA/VersionedFlowSensitive.h" "${_IMPORT_PREFIX}/include/WPA/WPAFSSolver.h" "${_IMPORT_PREFIX}/include/WPA/WPAPass.h" "${_IMPORT_PREFIX}/include/WPA/WPASolver.h" "${_IMPORT_PREFIX}/include/WPA/WPAStat.h"
|
|
85
85
|
)
|
|
86
86
|
else()
|
|
87
87
|
set_property(TARGET SVF::SvfCore
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,180 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Annotator.h
|
|
3
|
-
*
|
|
4
|
-
* Created on: May 4, 2014
|
|
5
|
-
* Author: Yulei Sui
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
#ifndef ANNOTATOR_H_
|
|
9
|
-
#define ANNOTATOR_H_
|
|
10
|
-
|
|
11
|
-
#include <SVF-LLVM/BasicTypes.h> // TODO: Remove LLVM Header
|
|
12
|
-
#include "SVFIR/SVFValue.h"
|
|
13
|
-
#include <vector>
|
|
14
|
-
|
|
15
|
-
namespace SVF
|
|
16
|
-
{
|
|
17
|
-
|
|
18
|
-
/*!
|
|
19
|
-
* Program annotator to write meta data information on LLVM IR
|
|
20
|
-
*/
|
|
21
|
-
class Annotator
|
|
22
|
-
{
|
|
23
|
-
|
|
24
|
-
public:
|
|
25
|
-
/// Constructor
|
|
26
|
-
Annotator()
|
|
27
|
-
{
|
|
28
|
-
SB_SLICESOURCE = "SOURCE_";
|
|
29
|
-
SB_SLICESINK = "SINK_";
|
|
30
|
-
SB_FESIBLE = "FESIBLE_";
|
|
31
|
-
SB_INFESIBLE = "INFESIBLE_";
|
|
32
|
-
|
|
33
|
-
DR_NOT_CHECK = "DRNOTCHECK_";
|
|
34
|
-
DR_CHECK = "DRCHECK_";
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
/// Destructor
|
|
38
|
-
virtual ~Annotator()
|
|
39
|
-
{
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
/// SB Has flag methods
|
|
43
|
-
//@{
|
|
44
|
-
inline bool hasSBSourceFlag(Instruction* inst) const
|
|
45
|
-
{
|
|
46
|
-
std::vector<Value* > values;
|
|
47
|
-
return evalMDTag(inst, inst, SB_SLICESOURCE, values);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
inline bool hasSBSinkFlag(Instruction* inst) const
|
|
51
|
-
{
|
|
52
|
-
std::vector<Value* > values;
|
|
53
|
-
return evalMDTag(inst, inst, SB_SLICESINK, values);
|
|
54
|
-
}
|
|
55
|
-
//@}
|
|
56
|
-
|
|
57
|
-
/// Race Detection Has flag methods
|
|
58
|
-
//@{
|
|
59
|
-
inline bool hasDRNotCheckFlag(Instruction* inst) const
|
|
60
|
-
{
|
|
61
|
-
//std::vector<Value* > values;
|
|
62
|
-
//return evalMDTag(inst, inst, DR_NOT_CHECK, values);
|
|
63
|
-
return inst->getMetadata(DR_NOT_CHECK);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
inline bool hasDRNotCheckFlag(const Instruction* inst) const
|
|
67
|
-
{
|
|
68
|
-
//std::vector<Value* > values;
|
|
69
|
-
//return evalMDTag(inst, inst, DR_NOT_CHECK, values);
|
|
70
|
-
return inst->getMetadata(DR_NOT_CHECK);
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
inline bool hasDRCheckFlag(Instruction* inst) const
|
|
74
|
-
{
|
|
75
|
-
//std::vector<Value* > values;
|
|
76
|
-
//return evalMDTag(inst, inst, DR_CHECK, values);
|
|
77
|
-
return inst->getMetadata(DR_CHECK);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
inline bool hasDRCheckFlag(const Instruction* inst) const
|
|
81
|
-
{
|
|
82
|
-
//std::vector<Value* > values;
|
|
83
|
-
//return evalMDTag(inst, inst, DR_CHECK, values);
|
|
84
|
-
return inst->getMetadata(DR_CHECK);
|
|
85
|
-
}
|
|
86
|
-
//@}
|
|
87
|
-
|
|
88
|
-
/// Simple add/remove meta data information
|
|
89
|
-
//@{
|
|
90
|
-
inline void addMDTag(Instruction* inst, std::string str)
|
|
91
|
-
{
|
|
92
|
-
addMDTag(inst, inst, str);
|
|
93
|
-
}
|
|
94
|
-
inline void removeMDTag(Instruction* inst, std::string str)
|
|
95
|
-
{
|
|
96
|
-
removeMDTag(inst, inst, str);
|
|
97
|
-
}
|
|
98
|
-
//@}
|
|
99
|
-
|
|
100
|
-
/// manipulate llvm meta data on instructions for a specific value
|
|
101
|
-
//@{
|
|
102
|
-
/// add flag to llvm metadata
|
|
103
|
-
inline void addMDTag(Instruction* inst, Value* val, std::string str)
|
|
104
|
-
{
|
|
105
|
-
assert(!val->getType()->isVoidTy() && "expecting non-void value for MD!");
|
|
106
|
-
std::vector<Value* > values;
|
|
107
|
-
//std::vector<llvm::Metadata *> metavalues;
|
|
108
|
-
// add the flag if we did not see it before
|
|
109
|
-
if (evalMDTag(inst, val, str, values) == false)
|
|
110
|
-
{
|
|
111
|
-
|
|
112
|
-
values.push_back(val);
|
|
113
|
-
//llvm::ArrayRef<llvm::Metadata*> ar(metavalues);
|
|
114
|
-
// FIXME: delete the old MDNode
|
|
115
|
-
inst->setMetadata(str, MDNode::get(inst->getContext(), nullptr));
|
|
116
|
-
//inst->setMetadata(str, llvm::MDNode::get(inst->getContext(), ar));
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
/// remove flag from llvm metadata
|
|
121
|
-
inline void removeMDTag(Instruction* inst, Value* val, std::string str)
|
|
122
|
-
{
|
|
123
|
-
assert(!val->getType()->isVoidTy() && "expecting non-void value for MD!");
|
|
124
|
-
std::vector<Value* > values;
|
|
125
|
-
|
|
126
|
-
// remove the flag if it is there
|
|
127
|
-
if (evalMDTag(inst, val, str, values) == true)
|
|
128
|
-
{
|
|
129
|
-
llvm::ArrayRef<Value* > ar(values);
|
|
130
|
-
// FIXME: delete the old MDNode
|
|
131
|
-
//inst->setMetadata(str, llvm::MDNode::get(inst->getContext(), ar));
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
//@}
|
|
135
|
-
|
|
136
|
-
private:
|
|
137
|
-
|
|
138
|
-
/// evaluate llvm metadata
|
|
139
|
-
inline bool evalMDTag(const Instruction* inst, const Value* val, std::string str,
|
|
140
|
-
std::vector<Value* >&) const
|
|
141
|
-
{
|
|
142
|
-
|
|
143
|
-
assert(val && "value should not be null");
|
|
144
|
-
|
|
145
|
-
bool hasFlag = false;
|
|
146
|
-
if (MDNode *mdNode = inst->getMetadata(str))
|
|
147
|
-
{
|
|
148
|
-
/// When mdNode has operands and value is not null
|
|
149
|
-
for (unsigned k = 0; k < mdNode->getNumOperands(); ++k)
|
|
150
|
-
{
|
|
151
|
-
//Value* v = mdNode->getOperand(k);
|
|
152
|
-
// if (v == val)
|
|
153
|
-
// hasFlag = true;
|
|
154
|
-
//else
|
|
155
|
-
// values.push_back(v);
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
return hasFlag;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
protected:
|
|
162
|
-
|
|
163
|
-
/// Saber annotations
|
|
164
|
-
//@{
|
|
165
|
-
const char* SB_SLICESOURCE;
|
|
166
|
-
const char* SB_SLICESINK;
|
|
167
|
-
const char* SB_FESIBLE;
|
|
168
|
-
const char* SB_INFESIBLE;
|
|
169
|
-
//@}
|
|
170
|
-
|
|
171
|
-
/// Race Detection annotations
|
|
172
|
-
//@{
|
|
173
|
-
const char* DR_NOT_CHECK;
|
|
174
|
-
const char* DR_CHECK;
|
|
175
|
-
//@}
|
|
176
|
-
};
|
|
177
|
-
|
|
178
|
-
} // End namespace SVF
|
|
179
|
-
|
|
180
|
-
#endif /* ANNOTATOR_H_ */
|