SVF
SaberAnnotator.h
Go to the documentation of this file.
1 //===- SaberAnnotator.h -- Annotating LLVM IR---------------------------------//
2 //
3 // SVF: Static Value-Flow Analysis
4 //
5 // Copyright (C) <2013-2017> <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 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 General Public License for more details.
17 
18 // You should have received a copy of the GNU General Public License
19 // along with this program. If not, see <http://www.gnu.org/licenses/>.
20 //
21 //===----------------------------------------------------------------------===//
22 
23 /*
24  * SaberAnnotator.h
25  *
26  * Created on: May 4, 2014
27  * Author: Yulei Sui
28  */
29 
30 #ifndef SABERANNOTATOR_H_
31 #define SABERANNOTATOR_H_
32 
33 #include "Util/BasicTypes.h"
34 #include "Util/Annotator.h"
35 
36 namespace SVF
37 {
38 
39 class ProgSlice;
43 class SaberAnnotator : public Annotator
44 {
45 
46 private:
48 public:
50  SaberAnnotator(ProgSlice* slice): _curSlice(slice)
51  {
52 
53  }
55  virtual ~SaberAnnotator()
56  {
57 
58  }
60 
61  void annotateSource();
62  void annotateSinks();
63  void annotateFeasibleBranch(const BranchInst *brInst, u32_t succPos);
64  void annotateInfeasibleBranch(const BranchInst *brInst, u32_t succPos);
65 
66  void annotateSwitch(SwitchInst *brInst, u32_t succPos);
68 };
69 
70 } // End namespace SVF
71 
72 #endif /* SABERANNOTATOR_H_ */
SaberAnnotator(ProgSlice *slice)
Constructor.
llvm::BranchInst BranchInst
Definition: BasicTypes.h:157
void annotateSource()
Annotation.
unsigned u32_t
Definition: SVFBasicTypes.h:75
const ProgSlice * _curSlice
llvm::SwitchInst SwitchInst
Definition: BasicTypes.h:158
void annotateFeasibleBranch(const BranchInst *brInst, u32_t succPos)
for isBitcode
Definition: ContextDDA.h:15
void annotateInfeasibleBranch(const BranchInst *brInst, u32_t succPos)
virtual ~SaberAnnotator()
Destructor.
void annotateSwitch(SwitchInst *brInst, u32_t succPos)