svf-lib 1.0.1205 → 1.0.1208
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.
- package/SVF-linux/Release-build/lib/libSvf.a +0 -0
- package/SVF-linux/include/DDA/DDAPass.h +0 -3
- package/SVF-linux/include/SVF-FE/BasicTypes.h +1 -0
- package/SVF-linux/include/SVF-FE/CHGBuilder.h +1 -0
- package/SVF-linux/include/SVF-FE/DCHG.h +1 -1
- package/SVF-linux/include/SVF-FE/LLVMModule.h +17 -0
- package/SVF-linux/include/Util/BasicTypes.h +0 -1
- package/SVF-linux/include/Util/SVFUtil.h +1 -13
- package/SVF-linux/include/WPA/WPAPass.h +0 -3
- package/SVF-osx/Release-build/lib/libSvf.a +0 -0
- package/SVF-osx/include/DDA/DDAPass.h +0 -3
- package/SVF-osx/include/SVF-FE/BasicTypes.h +1 -0
- package/SVF-osx/include/SVF-FE/CHGBuilder.h +1 -0
- package/SVF-osx/include/SVF-FE/DCHG.h +1 -1
- package/SVF-osx/include/SVF-FE/LLVMModule.h +17 -0
- package/SVF-osx/include/Util/BasicTypes.h +0 -1
- package/SVF-osx/include/Util/SVFUtil.h +1 -13
- package/SVF-osx/include/WPA/WPAPass.h +0 -3
- package/package.json +1 -1
|
Binary file
|
|
@@ -386,7 +386,7 @@ private:
|
|
|
386
386
|
void handleDISubroutineType(const DISubroutineType *subroutineType);
|
|
387
387
|
|
|
388
388
|
/// Finds all defined virtual functions and attaches them to nodes.
|
|
389
|
-
void buildVTables(const
|
|
389
|
+
void buildVTables(const SVFModule &module);
|
|
390
390
|
|
|
391
391
|
/// Returns a set of all children of type (CHA). Also gradually builds chaMap.
|
|
392
392
|
const NodeBS &cha(const DIType *type, bool firstField);
|
|
@@ -116,6 +116,23 @@ public:
|
|
|
116
116
|
return svfModule->getSVFFunction(fun);
|
|
117
117
|
}
|
|
118
118
|
|
|
119
|
+
/// Get the corresponding Function based on its name
|
|
120
|
+
inline const SVFFunction *getSVFFunction(std::string name)
|
|
121
|
+
{
|
|
122
|
+
Function *fun = nullptr;
|
|
123
|
+
|
|
124
|
+
for (u32_t i = 0; i < llvmModuleSet->getModuleNum(); ++i)
|
|
125
|
+
{
|
|
126
|
+
Module *mod = llvmModuleSet->getModule(i);
|
|
127
|
+
fun = mod->getFunction(name);
|
|
128
|
+
if (fun)
|
|
129
|
+
{
|
|
130
|
+
return llvmModuleSet->getSVFFunction(fun);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
return nullptr;
|
|
134
|
+
}
|
|
135
|
+
|
|
119
136
|
/// Fun decl --> def
|
|
120
137
|
bool hasDefinition(const Function *fun) const
|
|
121
138
|
{
|
|
@@ -74,7 +74,6 @@ typedef llvm::Instruction Instruction;
|
|
|
74
74
|
typedef llvm::CallBase CallBase;
|
|
75
75
|
typedef llvm::GlobalValue GlobalValue;
|
|
76
76
|
typedef llvm::GlobalVariable GlobalVariable;
|
|
77
|
-
typedef llvm::Module Module;
|
|
78
77
|
typedef llvm::User User;
|
|
79
78
|
typedef llvm::Loop Loop;
|
|
80
79
|
typedef llvm::LoopInfo LoopInfo;
|
|
@@ -224,19 +224,7 @@ inline CallSite getLLVMCallSite(const Instruction* inst)
|
|
|
224
224
|
/// Get the corresponding Function based on its name
|
|
225
225
|
inline const SVFFunction* getFunction(std::string name)
|
|
226
226
|
{
|
|
227
|
-
|
|
228
|
-
LLVMModuleSet* llvmModuleset = LLVMModuleSet::getLLVMModuleSet();
|
|
229
|
-
|
|
230
|
-
for (u32_t i = 0; i < llvmModuleset->getModuleNum(); ++i)
|
|
231
|
-
{
|
|
232
|
-
Module *mod = llvmModuleset->getModule(i);
|
|
233
|
-
fun = mod->getFunction(name);
|
|
234
|
-
if(fun)
|
|
235
|
-
{
|
|
236
|
-
return llvmModuleset->getSVFFunction(fun);
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
return nullptr;
|
|
227
|
+
return LLVMModuleSet::getLLVMModuleSet()->getSVFFunction(name);
|
|
240
228
|
}
|
|
241
229
|
|
|
242
230
|
/// Split into two substrings around the first occurrence of a separator string.
|
|
@@ -99,9 +99,6 @@ public:
|
|
|
99
99
|
/// Run pointer analysis on SVFModule
|
|
100
100
|
virtual void runOnModule(SVFModule* svfModule);
|
|
101
101
|
|
|
102
|
-
/// Run pointer analysis on LLVM module
|
|
103
|
-
virtual bool runOnModule(Module& module);
|
|
104
|
-
|
|
105
102
|
/// PTA name
|
|
106
103
|
virtual inline std::string getPassName() const
|
|
107
104
|
{
|
|
Binary file
|
|
@@ -386,7 +386,7 @@ private:
|
|
|
386
386
|
void handleDISubroutineType(const DISubroutineType *subroutineType);
|
|
387
387
|
|
|
388
388
|
/// Finds all defined virtual functions and attaches them to nodes.
|
|
389
|
-
void buildVTables(const
|
|
389
|
+
void buildVTables(const SVFModule &module);
|
|
390
390
|
|
|
391
391
|
/// Returns a set of all children of type (CHA). Also gradually builds chaMap.
|
|
392
392
|
const NodeBS &cha(const DIType *type, bool firstField);
|
|
@@ -116,6 +116,23 @@ public:
|
|
|
116
116
|
return svfModule->getSVFFunction(fun);
|
|
117
117
|
}
|
|
118
118
|
|
|
119
|
+
/// Get the corresponding Function based on its name
|
|
120
|
+
inline const SVFFunction *getSVFFunction(std::string name)
|
|
121
|
+
{
|
|
122
|
+
Function *fun = nullptr;
|
|
123
|
+
|
|
124
|
+
for (u32_t i = 0; i < llvmModuleSet->getModuleNum(); ++i)
|
|
125
|
+
{
|
|
126
|
+
Module *mod = llvmModuleSet->getModule(i);
|
|
127
|
+
fun = mod->getFunction(name);
|
|
128
|
+
if (fun)
|
|
129
|
+
{
|
|
130
|
+
return llvmModuleSet->getSVFFunction(fun);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
return nullptr;
|
|
134
|
+
}
|
|
135
|
+
|
|
119
136
|
/// Fun decl --> def
|
|
120
137
|
bool hasDefinition(const Function *fun) const
|
|
121
138
|
{
|
|
@@ -74,7 +74,6 @@ typedef llvm::Instruction Instruction;
|
|
|
74
74
|
typedef llvm::CallBase CallBase;
|
|
75
75
|
typedef llvm::GlobalValue GlobalValue;
|
|
76
76
|
typedef llvm::GlobalVariable GlobalVariable;
|
|
77
|
-
typedef llvm::Module Module;
|
|
78
77
|
typedef llvm::User User;
|
|
79
78
|
typedef llvm::Loop Loop;
|
|
80
79
|
typedef llvm::LoopInfo LoopInfo;
|
|
@@ -224,19 +224,7 @@ inline CallSite getLLVMCallSite(const Instruction* inst)
|
|
|
224
224
|
/// Get the corresponding Function based on its name
|
|
225
225
|
inline const SVFFunction* getFunction(std::string name)
|
|
226
226
|
{
|
|
227
|
-
|
|
228
|
-
LLVMModuleSet* llvmModuleset = LLVMModuleSet::getLLVMModuleSet();
|
|
229
|
-
|
|
230
|
-
for (u32_t i = 0; i < llvmModuleset->getModuleNum(); ++i)
|
|
231
|
-
{
|
|
232
|
-
Module *mod = llvmModuleset->getModule(i);
|
|
233
|
-
fun = mod->getFunction(name);
|
|
234
|
-
if(fun)
|
|
235
|
-
{
|
|
236
|
-
return llvmModuleset->getSVFFunction(fun);
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
return nullptr;
|
|
227
|
+
return LLVMModuleSet::getLLVMModuleSet()->getSVFFunction(name);
|
|
240
228
|
}
|
|
241
229
|
|
|
242
230
|
/// Split into two substrings around the first occurrence of a separator string.
|
|
@@ -99,9 +99,6 @@ public:
|
|
|
99
99
|
/// Run pointer analysis on SVFModule
|
|
100
100
|
virtual void runOnModule(SVFModule* svfModule);
|
|
101
101
|
|
|
102
|
-
/// Run pointer analysis on LLVM module
|
|
103
|
-
virtual bool runOnModule(Module& module);
|
|
104
|
-
|
|
105
102
|
/// PTA name
|
|
106
103
|
virtual inline std::string getPassName() const
|
|
107
104
|
{
|