svf-lib 1.0.2037 → 1.0.2039

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
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -174,6 +174,11 @@ public:
174
174
  }
175
175
  inline void addGlobalValueMap(const GlobalValue* glob, SVFGlobalValue* svfglob)
176
176
  {
177
+ if (auto glob_var = llvm::dyn_cast<llvm::GlobalVariable>(glob);
178
+ hasGlobalRep(glob_var))
179
+ {
180
+ glob = getGlobalRep(glob_var);
181
+ }
177
182
  LLVMConst2SVFConst[glob] = svfglob;
178
183
  setValueAttr(glob,svfglob);
179
184
  }
@@ -232,6 +237,11 @@ public:
232
237
 
233
238
  inline SVFGlobalValue* getSVFGlobalValue(const GlobalValue* g) const
234
239
  {
240
+ if (auto glob_var = llvm::dyn_cast<llvm::GlobalVariable>(g);
241
+ hasGlobalRep(glob_var))
242
+ {
243
+ g = getGlobalRep(glob_var);
244
+ }
235
245
  LLVMConst2SVFConstMap::const_iterator it = LLVMConst2SVFConst.find(g);
236
246
  assert(it!=LLVMConst2SVFConst.end() && "SVF Global not found!");
237
247
  assert(SVFUtil::isa<SVFGlobalValue>(it->second) && "not a SVFGlobal type!");
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -366,54 +366,6 @@ std::string dumpType(const Type* type);
366
366
 
367
367
  std::string dumpValueAndDbgInfo(const Value* val);
368
368
 
369
- /**
370
- * See more: https://github.com/SVF-tools/SVF/pull/1191
371
- *
372
- * Given the code:
373
- *
374
- * switch (a) {
375
- * case 0: printf("0\n"); break;
376
- * case 1:
377
- * case 2:
378
- * case 3: printf("a >=1 && a <= 3\n"); break;
379
- * case 4:
380
- * case 6:
381
- * case 7: printf("a >= 4 && a <=7\n"); break;
382
- * default: printf("a < 0 || a > 7"); break;
383
- * }
384
- *
385
- * Generate the IR:
386
- *
387
- * switch i32 %0, label %sw.default [
388
- * i32 0, label %sw.bb
389
- * i32 1, label %sw.bb1
390
- * i32 2, label %sw.bb1
391
- * i32 3, label %sw.bb1
392
- * i32 4, label %sw.bb3
393
- * i32 6, label %sw.bb3
394
- * i32 7, label %sw.bb3
395
- * ]
396
- *
397
- * We can get every case basic block and related case value:
398
- * [
399
- * {%sw.default, -1},
400
- * {%sw.bb, 0},
401
- * {%sw.bb1, 1},
402
- * {%sw.bb1, 2},
403
- * {%sw.bb1, 3},
404
- * {%sw.bb3, 4},
405
- * {%sw.bb3, 6},
406
- * {%sw.bb3, 7},
407
- * ]
408
- * Note: default case value is nullptr
409
- */
410
- void getSuccBBandCondValPairVec(const SwitchInst &switchInst, SuccBBAndCondValPairVec &vec);
411
-
412
- /**
413
- * Note: default case value is nullptr
414
- */
415
- s64_t getCaseValue(const SwitchInst &switchInst, SuccBBAndCondValPair &succBB2CondVal);
416
-
417
369
  } // End namespace LLVMUtil
418
370
 
419
371
  } // End namespace SVF
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "svf-lib",
3
- "version": "1.0.2037",
3
+ "version": "1.0.2039",
4
4
  "description": "SVF's npm support",
5
5
  "main": "index.js",
6
6
  "scripts": {