Static Value-Flow Analysis
Loading...
Searching...
No Matches
svf
include
SVFIR
PAGBuilderFromFile.h
Go to the documentation of this file.
1
//===- PAGBuilderFromFile.h -- Building SVFIR from File--------------------------------//
2
//
3
// SVF: Static Value-Flow Analysis
4
//
5
// Copyright (C) <2013-> <Yulei Sui>
6
//
7
8
// This program is free software: you can redistribute it and/or modify
9
// it under the terms of the GNU Affero General Public License as published by
10
// the Free Software Foundation, either version 3 of the License, or
11
// (at your option) any later version.
12
13
// This program is distributed in the hope that it will be useful,
14
// but WITHOUT ANY WARRANTY; without even the implied warranty of
15
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
// GNU Affero General Public License for more details.
17
18
// You should have received a copy of the GNU Affero General Public License
19
// along with this program. If not, see <http://www.gnu.org/licenses/>.
20
//
21
//===----------------------------------------------------------------------===//
22
23
/*
24
* PAGBuilderFromFile.h
25
*
26
* Created on: 20 Sep. 2018
27
* Author: Yulei Sui
28
*/
29
30
#ifndef INCLUDE_SVFIR_PAGBUILDERFROMFILE_H_
31
#define INCLUDE_SVFIR_PAGBUILDERFROMFILE_H_
32
33
#include "
SVFIR/SVFIR.h
"
34
#include "
Util/GeneralType.h
"
35
36
namespace
SVF
37
{
38
42
class
PAGBuilderFromFile
43
{
44
45
private
:
46
SVFIR
*
pag
;
47
std::string
file
;
48
public
:
50
PAGBuilderFromFile
(std::string
f
) :
51
pag
(
SVFIR
::
getPAG
(
true
)),
file
(
f
)
52
{
53
}
55
~PAGBuilderFromFile
()
56
{
57
}
58
60
SVFIR
*
getPAG
()
const
61
{
62
return
pag
;
63
}
64
66
std::string
getFileName
()
const
67
{
68
return
file
;
69
}
70
72
SVFIR
*
build
();
73
74
// Add edges
75
void
addEdge
(
NodeID
nodeSrc
,
NodeID
nodeDst
,
APOffset
offset
,
76
std::string
edge
);
77
};
78
79
}
// End namespace SVF
80
81
#endif
/* INCLUDE_SVFIR_PAGBUILDERFROMFILE_H_ */
GeneralType.h
SVFIR.h
true
#define true
Definition
cJSON.cpp:65
offset
buffer offset
Definition
cJSON.cpp:1113
SVF::PAGBuilderFromFile
Definition
PAGBuilderFromFile.h:43
SVF::PAGBuilderFromFile::getPAG
SVFIR * getPAG() const
Return SVFIR.
Definition
PAGBuilderFromFile.h:60
SVF::PAGBuilderFromFile::addEdge
void addEdge(NodeID nodeSrc, NodeID nodeDst, APOffset offset, std::string edge)
Definition
PAGBuilderFromFile.cpp:147
SVF::PAGBuilderFromFile::pag
SVFIR * pag
Definition
PAGBuilderFromFile.h:46
SVF::PAGBuilderFromFile::file
std::string file
Definition
PAGBuilderFromFile.h:47
SVF::PAGBuilderFromFile::getFileName
std::string getFileName() const
Return file name.
Definition
PAGBuilderFromFile.h:66
SVF::PAGBuilderFromFile::PAGBuilderFromFile
PAGBuilderFromFile(std::string f)
Constructor.
Definition
PAGBuilderFromFile.h:50
SVF::PAGBuilderFromFile::build
SVFIR * build()
Start building.
Definition
PAGBuilderFromFile.cpp:61
SVF::PAGBuilderFromFile::~PAGBuilderFromFile
~PAGBuilderFromFile()
Destructor.
Definition
PAGBuilderFromFile.h:55
SVF::SVFIR
Definition
SVFIR.h:46
SVF
for isBitcode
Definition
BasicTypes.h:70
SVF::NodeID
u32_t NodeID
Definition
GeneralType.h:76
SVF::APOffset
s64_t APOffset
Definition
GeneralType.h:80
SVF::IRBuilder
llvm::IRBuilder IRBuilder
Definition
BasicTypes.h:76
Generated by
1.9.8