ClearBlue
SEGSimpleOperandNode.h
1 /*
2  * SEGSimpleOperandNode.h
3  *
4  * Qingkai
5  *
6  * This node is to model simple operand.
7  */
8 
9 #ifndef IR_SEG_SEGSIMPLEOPERANDNODE_H
10 #define IR_SEG_SEGSIMPLEOPERANDNODE_H
11 
12 #include <llvm/IR/BasicBlock.h>
13 #include <llvm/IR/Value.h>
14 
15 #include "IR/SEG/SymbolicExprGraph.h"
16 #include "Persistence/PersistenceBasis.h"
17 
18 using namespace llvm;
19 
21 public:
24  SEGSimpleOperandNode(PersistedSEGSimpleOperandNode *Node,
25  SymbolicExprGraph *SEG)
26  : SEGOperandNode(Node, SEG) {}
27 
28  virtual void assembleSEGObject(std::map<int, SEGObject *> &FuncSEGObjMap) {
29  SEGOperandNode::assembleSEGObject(FuncSEGObjMap);
30  }
31 
32 private:
33  SEGSimpleOperandNode(Type *Ty, SymbolicExprGraph *SEG, BasicBlock *BB)
34  : SEGOperandNode(SEGOBJK_SimpleOperand, Ty, SEG, BB) {}
35 
36  SEGSimpleOperandNode(Value *Val, Type *Ty, SymbolicExprGraph *SEG,
37  BasicBlock *BB)
38  : SEGOperandNode(SEGOBJK_SimpleOperand, Val, Ty, SEG, BB) {}
39 
40  friend class SymbolicExprGraph;
41 
42 public:
44 
45  virtual PersistedSEGObject *createPersistedObject() const {
46  PersistedSEGObject *PersistedObj = new PersistedSEGSimpleOperandNode;
47  return PersistedObj;
48  }
49 
50 public:
51  static bool classof(const SEGObject *N) {
52  return N->getKind() == SEGOBJK_SimpleOperand;
53  }
54 };
55 
56 #endif
SEGOperandNode
Definition: SymbolicExprGraph.h:539
SymbolicExprGraph
Definition: SymbolicExprGraph.h:855
SEGObject
Definition: SymbolicExprGraph.h:87
SEGSimpleOperandNode
Definition: SEGSimpleOperandNode.h:20
SEGSimpleOperandNode::SEGSimpleOperandNode
SEGSimpleOperandNode(PersistedSEGSimpleOperandNode *Node, SymbolicExprGraph *SEG)
Definition: SEGSimpleOperandNode.h:24
SEGSimpleOperandNode::assembleSEGObject
virtual void assembleSEGObject(std::map< int, SEGObject * > &FuncSEGObjMap)
Assemble the SEG object's related objects.
Definition: SEGSimpleOperandNode.h:28
SEGOperandNode::assembleSEGObject
virtual void assembleSEGObject(std::map< int, SEGObject * > &FuncSEGObjMap)
Assemble the SEG object's related objects.
Definition: SymbolicExprGraph.h:545