ClearBlue
SEGSimpleOpcodeNode.h
1 /*
2  * SEGSimpleOperandNode.h
3  *
4  * Qingkai
5  *
6  * This node is to model simple opcode.
7  */
8 
9 #ifndef IR_SEG_SEGSIMPLEOPCODENODE_H
10 #define IR_SEG_SEGSIMPLEOPCODENODE_H
11 
12 #include <llvm/IR/BasicBlock.h>
13 
14 #include "IR/SEG/SymbolicExprGraph.h"
15 
16 using namespace llvm;
17 
19 public:
22  SEGSimpleOpcodeNode(PersistedSEGSimpleOpcodeNode *Node,
23  SymbolicExprGraph *SEG)
24  : SEGOpcodeNode(Node, SEG) {}
25 
26  virtual void assembleSEGObject(std::map<int, SEGObject *> &FuncSEGObjMap) {
27  SEGOpcodeNode::assembleSEGObject(FuncSEGObjMap);
28  }
29 
30 private:
31  SEGSimpleOpcodeNode(CodeKind Opcode, Type *Ty, SymbolicExprGraph *SEG,
32  BasicBlock *BB)
33  : SEGOpcodeNode(SEGOBJK_SimpleOpcode, Opcode, Ty, SEG, BB) {}
34 
35  friend class SymbolicExprGraph;
36 
37 public:
39 
40  virtual PersistedSEGObject *createPersistedObject() const {
41  PersistedSEGObject *PersistedObj = new PersistedSEGSimpleOpcodeNode;
42  return PersistedObj;
43  }
44 
45 public:
46  static bool classof(const SEGObject *N) {
47  return N->getKind() == SEGOBJK_SimpleOpcode;
48  }
49 };
50 
51 #endif
SEGSimpleOpcodeNode
Definition: SEGSimpleOpcodeNode.h:18
SymbolicExprGraph
Definition: SymbolicExprGraph.h:855
SEGSimpleOpcodeNode::assembleSEGObject
virtual void assembleSEGObject(std::map< int, SEGObject * > &FuncSEGObjMap)
Assemble the SEG object's related objects.
Definition: SEGSimpleOpcodeNode.h:26
SEGOpcodeNode::assembleSEGObject
virtual void assembleSEGObject(std::map< int, SEGObject * > &FuncSEGObjMap)
Assemble the SEG object's related objects.
Definition: SymbolicExprGraph.h:630
SEGObject
Definition: SymbolicExprGraph.h:87
SEGOpcodeNode
Definition: SymbolicExprGraph.h:624
SEGSimpleOpcodeNode::SEGSimpleOpcodeNode
SEGSimpleOpcodeNode(PersistedSEGSimpleOpcodeNode *Node, SymbolicExprGraph *SEG)
Definition: SEGSimpleOpcodeNode.h:22