svf-lib 1.0.1821 → 1.0.1822
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.
|
Binary file
|
|
Binary file
|
|
@@ -243,6 +243,7 @@ class SVFType
|
|
|
243
243
|
{
|
|
244
244
|
friend class SVFIRWriter;
|
|
245
245
|
friend class SVFIRReader;
|
|
246
|
+
friend class LLVMModuleSet;
|
|
246
247
|
|
|
247
248
|
public:
|
|
248
249
|
typedef s64_t GNodeK;
|
|
@@ -258,6 +259,25 @@ public:
|
|
|
258
259
|
SVFOtherTy,
|
|
259
260
|
};
|
|
260
261
|
|
|
262
|
+
public:
|
|
263
|
+
|
|
264
|
+
inline static SVFType* getPtrTy()
|
|
265
|
+
{
|
|
266
|
+
assert(ptrTy && "ptr type not set?");
|
|
267
|
+
return ptrTy;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
inline static SVFType* getI8Ty()
|
|
271
|
+
{
|
|
272
|
+
assert(i8Ty && "int8 type not set?");
|
|
273
|
+
return i8Ty;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
private:
|
|
277
|
+
|
|
278
|
+
static SVFType* ptrTy; ///< ptr type
|
|
279
|
+
static SVFType* i8Ty; ///< 8-bit int type
|
|
280
|
+
|
|
261
281
|
private:
|
|
262
282
|
GNodeK kind; ///< used for classof
|
|
263
283
|
const SVFPointerType*
|
|
@@ -268,7 +288,7 @@ private:
|
|
|
268
288
|
///< array
|
|
269
289
|
|
|
270
290
|
protected:
|
|
271
|
-
SVFType(bool svt, SVFTyKind k, u32_t Sz)
|
|
291
|
+
SVFType(bool svt, SVFTyKind k, u32_t Sz = 1)
|
|
272
292
|
: kind(k), getPointerToTy(nullptr), typeinfo(nullptr),
|
|
273
293
|
isSingleValTy(svt), byteSize(Sz)
|
|
274
294
|
{
|
|
@@ -357,7 +377,7 @@ private:
|
|
|
357
377
|
const SVFType* ptrElementType;
|
|
358
378
|
|
|
359
379
|
public:
|
|
360
|
-
SVFPointerType(u32_t byteSize)
|
|
380
|
+
SVFPointerType(u32_t byteSize = 1)
|
|
361
381
|
: SVFType(true, SVFPointerTy, byteSize), ptrElementType(nullptr)
|
|
362
382
|
{
|
|
363
383
|
}
|
|
@@ -389,7 +409,7 @@ private:
|
|
|
389
409
|
short signAndWidth; ///< For printing
|
|
390
410
|
|
|
391
411
|
public:
|
|
392
|
-
SVFIntegerType(u32_t byteSize) : SVFType(true, SVFIntegerTy, byteSize) {}
|
|
412
|
+
SVFIntegerType(u32_t byteSize = 1) : SVFType(true, SVFIntegerTy, byteSize) {}
|
|
393
413
|
static inline bool classof(const SVFType* node)
|
|
394
414
|
{
|
|
395
415
|
return node->getKind() == SVFIntegerTy;
|
|
@@ -418,7 +438,7 @@ private:
|
|
|
418
438
|
|
|
419
439
|
public:
|
|
420
440
|
SVFFunctionType(const SVFType* rt)
|
|
421
|
-
: SVFType(false, SVFFunctionTy,
|
|
441
|
+
: SVFType(false, SVFFunctionTy, 1), retTy(rt)
|
|
422
442
|
{
|
|
423
443
|
}
|
|
424
444
|
static inline bool classof(const SVFType* node)
|
|
@@ -443,7 +463,7 @@ private:
|
|
|
443
463
|
std::string name;
|
|
444
464
|
|
|
445
465
|
public:
|
|
446
|
-
SVFStructType(u32_t byteSize) : SVFType(false, SVFStructTy, byteSize) {}
|
|
466
|
+
SVFStructType(u32_t byteSize = 1) : SVFType(false, SVFStructTy, byteSize) {}
|
|
447
467
|
|
|
448
468
|
static inline bool classof(const SVFType* node)
|
|
449
469
|
{
|
|
@@ -476,7 +496,7 @@ private:
|
|
|
476
496
|
const SVFType* typeOfElement; /// For printing & debugging
|
|
477
497
|
|
|
478
498
|
public:
|
|
479
|
-
SVFArrayType(u32_t byteSize)
|
|
499
|
+
SVFArrayType(u32_t byteSize = 1)
|
|
480
500
|
: SVFType(false, SVFArrayTy, byteSize), numOfElement(0), typeOfElement(nullptr)
|
|
481
501
|
{
|
|
482
502
|
}
|
|
@@ -515,7 +535,7 @@ private:
|
|
|
515
535
|
std::string repr; /// Field representation for printing
|
|
516
536
|
|
|
517
537
|
public:
|
|
518
|
-
SVFOtherType(u32_t byteSize
|
|
538
|
+
SVFOtherType(bool isSingleValueTy, u32_t byteSize = 1) : SVFType(isSingleValueTy, SVFOtherTy, byteSize) {}
|
|
519
539
|
|
|
520
540
|
static inline bool classof(const SVFType* node)
|
|
521
541
|
{
|