svf-tools 1.0.561 → 1.0.562
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-doxygen/html/html/ExtAPI_8cpp_source.html +17 -17
- package/SVF-doxygen/html/html/ExtAPI_8h_source.html +17 -17
- package/SVF-doxygen/html/html/SVFIRBuilder_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/SVFIRBuilder_8h_source.html +6 -6
- package/SVF-doxygen/html/html/SVFUtil_8h_source.html +7 -7
- package/SVF-doxygen/html/html/classSVF_1_1ExtAPI.html +50 -50
- package/SVF-doxygen/html/html/classSVF_1_1SVFIRBuilder.html +42 -39
- package/lib/SVF-FE/SVFIRBuilder.cpp +21 -0
- package/lib/Util/ExtAPI.cpp +42 -0
- package/package.json +1 -1
|
@@ -1281,6 +1281,27 @@ void SVFIRBuilder::handleExtCall(CallSite cs, const SVFFunction *callee)
|
|
|
1281
1281
|
else
|
|
1282
1282
|
writeWrnMsg("We need two valid NodeIDs and an offset to add a Gep edge");
|
|
1283
1283
|
}
|
|
1284
|
+
else if (op.getOperator() == "BinaryOPStmt")
|
|
1285
|
+
{
|
|
1286
|
+
if (op.getOperands().size() == 4)
|
|
1287
|
+
addBinaryOPEdge(op.getOperands()[0], op.getOperands()[1], op.getOperands()[2], op.getOperands()[3]);
|
|
1288
|
+
else
|
|
1289
|
+
writeWrnMsg("We need four valid NodeIDs to add a BinaryOP edge");
|
|
1290
|
+
}
|
|
1291
|
+
else if (op.getOperator() == "UnaryOPStmt")
|
|
1292
|
+
{
|
|
1293
|
+
if (op.getOperands().size() == 3)
|
|
1294
|
+
addUnaryOPEdge(op.getOperands()[0], op.getOperands()[1], op.getOperands()[2]);
|
|
1295
|
+
else
|
|
1296
|
+
writeWrnMsg("We need three valid NodeIDs to add a UnaryOP edge");
|
|
1297
|
+
}
|
|
1298
|
+
else if (op.getOperator() == "CmpStmt")
|
|
1299
|
+
{
|
|
1300
|
+
if (op.getOperands().size() == 4)
|
|
1301
|
+
addCmpEdge(op.getOperands()[0], op.getOperands()[1], op.getOperands()[2], op.getOperands()[3]);
|
|
1302
|
+
else
|
|
1303
|
+
writeWrnMsg("We need four valid NodeIDs to add a CmpStmt edge");
|
|
1304
|
+
}
|
|
1284
1305
|
else if (op.getOperator() == "memset_like")
|
|
1285
1306
|
{
|
|
1286
1307
|
// this is for memset(void *str, int c, size_t n)
|
package/lib/Util/ExtAPI.cpp
CHANGED
|
@@ -266,6 +266,48 @@ s32_t ExtAPI::getNodeIDType(std::string s)
|
|
|
266
266
|
return -2;
|
|
267
267
|
else if(argStr == "Obj")
|
|
268
268
|
return -3;
|
|
269
|
+
else if(argStr == "Add")
|
|
270
|
+
return BinaryOperator::Add;
|
|
271
|
+
else if(argStr == "Sub")
|
|
272
|
+
return BinaryOperator::Sub;
|
|
273
|
+
else if(argStr == "Mul")
|
|
274
|
+
return BinaryOperator::Mul;
|
|
275
|
+
else if(argStr == "SDiv")
|
|
276
|
+
return BinaryOperator::SDiv;
|
|
277
|
+
else if(argStr == "SRem")
|
|
278
|
+
return BinaryOperator::SRem;
|
|
279
|
+
else if(argStr == "Xor")
|
|
280
|
+
return BinaryOperator::Xor;
|
|
281
|
+
else if(argStr == "And")
|
|
282
|
+
return BinaryOperator::And;
|
|
283
|
+
else if(argStr == "Or")
|
|
284
|
+
return BinaryOperator::Or;
|
|
285
|
+
else if(argStr == "AShr")
|
|
286
|
+
return BinaryOperator::AShr;
|
|
287
|
+
else if(argStr == "Shl")
|
|
288
|
+
return BinaryOperator::Shl;
|
|
289
|
+
else if(argStr == "ICMP_EQ")
|
|
290
|
+
return CmpInst::ICMP_EQ;
|
|
291
|
+
else if(argStr == "ICMP_NE")
|
|
292
|
+
return CmpInst::ICMP_NE;
|
|
293
|
+
else if(argStr == "ICMP_UGT")
|
|
294
|
+
return CmpInst::ICMP_UGT;
|
|
295
|
+
else if(argStr == "ICMP_SGT")
|
|
296
|
+
return CmpInst::ICMP_SGT;
|
|
297
|
+
else if(argStr == "ICMP_UGE")
|
|
298
|
+
return CmpInst::ICMP_UGE;
|
|
299
|
+
else if(argStr == "ICMP_SGE")
|
|
300
|
+
return CmpInst::ICMP_SGE;
|
|
301
|
+
else if(argStr == "ICMP_ULT")
|
|
302
|
+
return CmpInst::ICMP_ULT;
|
|
303
|
+
else if(argStr == "ICMP_SLT")
|
|
304
|
+
return CmpInst::ICMP_SLT;
|
|
305
|
+
else if(argStr == "ICMP_ULE")
|
|
306
|
+
return CmpInst::ICMP_ULE;
|
|
307
|
+
else if(argStr == "ICMP_SLE")
|
|
308
|
+
return CmpInst::ICMP_SLE;
|
|
309
|
+
else if(argStr == "FNeg")
|
|
310
|
+
return UnaryOperator::FNeg;
|
|
269
311
|
else // offset
|
|
270
312
|
{
|
|
271
313
|
u32_t i=0;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "svf-tools",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.562",
|
|
4
4
|
"description": "* <b>[TypeClone](https://github.com/SVF-tools/SVF/wiki/TypeClone) published in our [ECOOP paper](https://yuleisui.github.io/publications/ecoop20.pdf) is now available in SVF </b> * <b>SVF now uses a single script for its build. Just type [`source ./build.sh`](https://github.com/SVF-tools/SVF/blob/master/build.sh) in your terminal, that's it!</b> * <b>SVF now supports LLVM-10.0.0! </b> * <b>We thank [bsauce](https://github.com/bsauce) for writing a user manual of SVF ([link1](https://www.jianshu.com/p/068a08ec749c) and [link2](https://www.jianshu.com/p/777c30d4240e)) in Chinese </b> * <b>SVF now supports LLVM-9.0.0 (Thank [Byoungyoung Lee](https://github.com/SVF-tools/SVF/issues/142) for his help!). </b> * <b>SVF now supports a set of [field-sensitive pointer analyses](https://yuleisui.github.io/publications/sas2019a.pdf). </b> * <b>[Use SVF as an external lib](https://github.com/SVF-tools/SVF/wiki/Using-SVF-as-a-lib-in-your-own-tool) for your own project (Contributed by [Hongxu Chen](https://github.com/HongxuChen)). </b> * <b>SVF now supports LLVM-7.0.0. </b> * <b>SVF now supports Docker. [Try SVF in Docker](https://github.com/SVF-tools/SVF/wiki/Try-SVF-in-Docker)! </b> * <b>SVF now supports [LLVM-6.0.0](https://github.com/svf-tools/SVF/pull/38) (Contributed by [Jack Anthony](https://github.com/jackanth)). </b> * <b>SVF now supports [LLVM-4.0.0](https://github.com/svf-tools/SVF/pull/23) (Contributed by Jared Carlson. Thank [Jared](https://github.com/jcarlson23) and [Will](https://github.com/dtzWill) for their in-depth [discussions](https://github.com/svf-tools/SVF/pull/18) about updating SVF!) </b> * <b>SVF now supports analysis for C++ programs.</b> <br />",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|