Skip to content

Commit

Permalink
SVF support: fix for new API
Browse files Browse the repository at this point in the history
SVF has changed the API a bit.
Based on fixes by @vwvw.

Fixes #338.
  • Loading branch information
mchalupa committed Jul 29, 2020
1 parent ead51b2 commit 7face62
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions include/dg/llvm/PointerAnalysis/SVFPointerAnalysis.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

#include "WPA/Andersen.h" // Andersen analysis from SVF
#include "SVF-FE/LLVMModule.h" // LLVMModuleSet
#include "SVF-FE/PAGBuilder.h" // PAGBuilder

#if (__clang__)
#pragma clang diagnostic push
Expand Down Expand Up @@ -186,8 +187,12 @@ class SVFPointerAnalysis : public LLVMPointerAnalysis {

auto moduleset = LLVMModuleSet::getLLVMModuleSet();
_svfModule = moduleset->buildSVFModule(*const_cast<llvm::Module*>(_module));
_pta.reset(new Andersen());
_pta->analyze(_svfModule);

PAGBuilder builder;
PAG* pag = builder.build(_svfModule);

_pta.reset(new Andersen(pag));
_pta->analyze();

DBG_SECTION_END(pta, "Done running SVF pointer analysis (Andersen)");
return true;
Expand Down

0 comments on commit 7face62

Please sign in to comment.