svf-lib 1.0.1885 → 1.0.1886

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
Binary file
@@ -328,7 +328,17 @@ public:
328
328
 
329
329
  Module* getMainLLVMModule() const
330
330
  {
331
- return getModule(0);
331
+ assert(!empty() && "empty LLVM module!!");
332
+ for (size_t i = 0; i < getModuleNum(); ++i)
333
+ {
334
+ Module& module = getModuleRef(i);
335
+ if (module.getName().str() != ExtAPI::getExtAPI()->getExtBcPath())
336
+ {
337
+ return &module;
338
+ }
339
+ }
340
+ assert(false && "no main module found!");
341
+ return nullptr;
332
342
  }
333
343
 
334
344
  LLVMContext& getContext() const
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "svf-lib",
3
- "version": "1.0.1885",
3
+ "version": "1.0.1886",
4
4
  "description": "SVF's npm support",
5
5
  "main": "index.js",
6
6
  "scripts": {