1919
2020#include " phasar/DB/ProjectIRDB.h"
2121#include " phasar/PhasarLLVM/AnalysisStrategy/AnalysisSetup.h"
22+ #include " phasar/PhasarLLVM/ControlFlow/Resolver/CallGraphAnalysisType.h"
2223#include " phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSIDESolverConfig.h"
2324#include " phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Solver/IDESolver.h"
2425
@@ -54,7 +55,7 @@ class WholeProgramAnalysis {
5455
5556public:
5657 WholeProgramAnalysis (IFDSIDESolverConfig SolverConfig, ProjectIRDB &IRDB,
57- std::set <std::string> EntryPoints = {},
58+ llvm::ArrayRef <std::string> EntryPoints = {},
5859 PointerAnalysisTy *PointerInfo = nullptr ,
5960 CallGraphAnalysisTy *CallGraph = nullptr ,
6061 TypeHierarchyTy *TypeHierarchy = nullptr )
@@ -67,11 +68,12 @@ class WholeProgramAnalysis {
6768 : std::unique_ptr<PointerAnalysisTy>(PointerInfo)),
6869 CallGraph(CallGraph == nullptr
6970 ? std::make_unique<CallGraphAnalysisTy>(
70- IRDB, CallGraphAnalysisType::OTF, EntryPoints,
71+ & IRDB, CallGraphAnalysisType::OTF, EntryPoints,
7172 this ->TypeHierarchy.get(), this->PointerInfo.get())
7273 : std::unique_ptr<CallGraphAnalysisTy>(CallGraph)),
73- EntryPoints(EntryPoints),
74- ProblemDesc(&IRDB, TypeHierarchy, CallGraph, PointerInfo, EntryPoints),
74+ EntryPoints(EntryPoints.begin(), EntryPoints.end()),
75+ ProblemDesc(&IRDB, TypeHierarchy, CallGraph, PointerInfo,
76+ this ->EntryPoints),
7577 DataFlowSolver(ProblemDesc) {
7678 if constexpr (has_setIFDSIDESolverConfig_v<ProblemDescription>) {
7779 ProblemDesc.setIFDSIDESolverConfig (SolverConfig);
@@ -83,7 +85,7 @@ class WholeProgramAnalysis {
8385 typename T::ConfigurationTy, HasNoConfigurationType>>>
8486 WholeProgramAnalysis (IFDSIDESolverConfig SolverConfig, ProjectIRDB &IRDB,
8587 ConfigurationTy *Config,
86- std::set <std::string> EntryPoints = {},
88+ llvm::ArrayRef <std::string> EntryPoints = {},
8789 PointerAnalysisTy *PointerInfo = nullptr ,
8890 CallGraphAnalysisTy *CallGraph = nullptr ,
8991 TypeHierarchyTy *TypeHierarchy = nullptr )
@@ -96,12 +98,12 @@ class WholeProgramAnalysis {
9698 : std::unique_ptr<PointerAnalysisTy>(PointerInfo)),
9799 CallGraph(CallGraph == nullptr
98100 ? std::make_unique<CallGraphAnalysisTy>(
99- IRDB, CallGraphAnalysisType::OTF, EntryPoints,
101+ & IRDB, CallGraphAnalysisType::OTF, EntryPoints,
100102 this ->TypeHierarchy.get(), this->PointerInfo.get())
101103 : std::unique_ptr<CallGraphAnalysisTy>(CallGraph)),
102- EntryPoints(EntryPoints), Config(Config),
104+ EntryPoints(EntryPoints.begin(), EntryPoints.end() ), Config(Config),
103105 ProblemDesc(&IRDB, TypeHierarchy, CallGraph, PointerInfo, *Config,
104- EntryPoints),
106+ this -> EntryPoints),
105107 DataFlowSolver(ProblemDesc) {
106108 if constexpr (has_setIFDSIDESolverConfig_v<ProblemDescription>) {
107109 ProblemDesc.setIFDSIDESolverConfig (SolverConfig);
@@ -113,7 +115,7 @@ class WholeProgramAnalysis {
113115 typename T::ConfigurationTy, HasNoConfigurationType>>>
114116 WholeProgramAnalysis (IFDSIDESolverConfig SolverConfig, ProjectIRDB &IRDB,
115117 std::string ConfigPath,
116- std::set <std::string> EntryPoints = {},
118+ llvm::ArrayRef <std::string> EntryPoints = {},
117119 PointerAnalysisTy *PointerInfo = nullptr ,
118120 CallGraphAnalysisTy *CallGraph = nullptr ,
119121 TypeHierarchyTy *TypeHierarchy = nullptr )
@@ -126,13 +128,14 @@ class WholeProgramAnalysis {
126128 : std::unique_ptr<PointerAnalysisTy>(PointerInfo)),
127129 CallGraph(CallGraph == nullptr
128130 ? std::make_unique<CallGraphAnalysisTy>(
129- IRDB, CallGraphAnalysisType::OTF, EntryPoints,
131+ & IRDB, CallGraphAnalysisType::OTF, EntryPoints,
130132 this ->TypeHierarchy.get(), this->PointerInfo.get())
131133 : std::unique_ptr<CallGraphAnalysisTy>(CallGraph)),
132- EntryPoints(EntryPoints), Config(new ConfigurationTy(ConfigPath)),
133- OwnsConfig(true ), ConfigPath(ConfigPath),
134+ EntryPoints(EntryPoints.begin(), EntryPoints.end()),
135+ Config(new ConfigurationTy(ConfigPath)), OwnsConfig(true ),
136+ ConfigPath(ConfigPath),
134137 ProblemDesc(&IRDB, TypeHierarchy, CallGraph, PointerInfo, *Config,
135- EntryPoints),
138+ this -> EntryPoints),
136139 DataFlowSolver(ProblemDesc) {
137140 if constexpr (has_setIFDSIDESolverConfig_v<ProblemDescription>) {
138141 ProblemDesc.setIFDSIDESolverConfig (SolverConfig);
0 commit comments