|
21 | 21 | #include "phasar/ControlFlow/CallGraphAnalysisType.h" |
22 | 22 | #include "phasar/ControlFlow/ICFGBase.h" |
23 | 23 | #include "phasar/PhasarLLVM/ControlFlow/LLVMBasedCFG.h" |
| 24 | +#include "phasar/PhasarLLVM/ControlFlow/LLVMVFTableProvider.h" |
24 | 25 | #include "phasar/PhasarLLVM/Pointer/LLVMAliasInfo.h" |
25 | 26 | #include "phasar/PhasarLLVM/Utils/LLVMBasedContainerConfig.h" |
26 | | -#include "phasar/Utils/MaybeUniquePtr.h" |
27 | | -#include "phasar/Utils/MemoryResource.h" |
28 | 27 | #include "phasar/Utils/Soundness.h" |
29 | 28 |
|
30 | 29 | #include "llvm/ADT/ArrayRef.h" |
31 | | -#include "llvm/ADT/DenseMap.h" |
32 | 30 | #include "llvm/ADT/SmallVector.h" |
33 | 31 | #include "llvm/IR/Function.h" |
34 | 32 | #include "llvm/IR/Instruction.h" |
@@ -90,17 +88,19 @@ class LLVMBasedICFG : public LLVMBasedCFG, public ICFGBase<LLVMBasedICFG> { |
90 | 88 | bool IncludeGlobals = true); |
91 | 89 | explicit LLVMBasedICFG(LLVMProjectIRDB *IRDB, Resolver &CGResolver, |
92 | 90 | llvm::ArrayRef<std::string> EntryPoints = {}, |
93 | | - LLVMTypeHierarchy *TH = nullptr, |
| 91 | + Soundness S = Soundness::Soundy, |
| 92 | + bool IncludeGlobals = true); |
| 93 | + explicit LLVMBasedICFG(LLVMProjectIRDB *IRDB, Resolver &CGResolver, |
| 94 | + LLVMVFTableProvider VTP, |
| 95 | + llvm::ArrayRef<std::string> EntryPoints = {}, |
94 | 96 | Soundness S = Soundness::Soundy, |
95 | 97 | bool IncludeGlobals = true); |
96 | 98 |
|
97 | 99 | /// Creates an ICFG with an already given call-graph |
98 | | - explicit LLVMBasedICFG(CallGraph<n_t, f_t> CG, LLVMProjectIRDB *IRDB, |
99 | | - LLVMTypeHierarchy *TH = nullptr); |
| 100 | + explicit LLVMBasedICFG(CallGraph<n_t, f_t> CG, LLVMProjectIRDB *IRDB); |
100 | 101 |
|
101 | 102 | explicit LLVMBasedICFG(LLVMProjectIRDB *IRDB, |
102 | | - const nlohmann::json &SerializedCG, |
103 | | - LLVMTypeHierarchy *TH = nullptr); |
| 103 | + const nlohmann::json &SerializedCG); |
104 | 104 |
|
105 | 105 | // Deleter of LLVMTypeHierarchy may be unknown here... |
106 | 106 | ~LLVMBasedICFG(); |
@@ -165,13 +165,14 @@ class LLVMBasedICFG : public LLVMBasedCFG, public ICFGBase<LLVMBasedICFG> { |
165 | 165 |
|
166 | 166 | void initialize(LLVMProjectIRDB *IRDB, Resolver &CGResolver, |
167 | 167 | llvm::ArrayRef<std::string> EntryPoints, |
168 | | - LLVMTypeHierarchy *TH, Soundness S, bool IncludeGlobals); |
| 168 | + const LLVMVFTableProvider &VTP, Soundness S, |
| 169 | + bool IncludeGlobals); |
169 | 170 |
|
170 | 171 | // --- |
171 | 172 |
|
172 | 173 | CallGraph<const llvm::Instruction *, const llvm::Function *> CG; |
173 | 174 | LLVMProjectIRDB *IRDB = nullptr; |
174 | | - MaybeUniquePtr<LLVMTypeHierarchy, true> TH; |
| 175 | + LLVMVFTableProvider VTP; |
175 | 176 | }; |
176 | 177 |
|
177 | 178 | extern template class ICFGBase<LLVMBasedICFG>; |
|
0 commit comments