ClearBlue
SEGCastNode.h
1 /*
2  * SEGCastNode.h
3  *
4  * Qingkai
5  *
6  * This node is to model a cast operation.
7  */
8 
9 #ifndef IR_SEG_SEGCASTNODE_H
10 #define IR_SEG_SEGCASTNODE_H
11 
12 #include <llvm/IR/BasicBlock.h>
13 
14 #include "IR/SEG/SymbolicExprGraph.h"
15 
16 using namespace llvm;
17 
18 class PersistedSEGCastNode;
19 
20 class SEGCastNode : public SEGOpcodeNode {
21 public:
24  SEGCastNode(PersistedSEGCastNode *Node, SymbolicExprGraph *SEG);
25 
26  virtual void assembleSEGObject(std::map<int, SEGObject *> &FuncSEGObjMap) {
27  SEGOpcodeNode::assembleSEGObject(FuncSEGObjMap);
28  }
29 
30 private:
31  uint64_t OriginSize;
32  uint64_t TargetSize;
33 
34  SEGCastNode(CodeKind Opcode, Type *Ty, SymbolicExprGraph *SEG, BasicBlock *BB,
35  uint64_t OSz, uint64_t TSz);
36 
37  friend class SymbolicExprGraph;
38 
39 public:
40  virtual ~SEGCastNode();
41 
42  virtual PersistedSEGObject *createPersistedObject() const;
43 
44  virtual void dot(raw_fd_ostream &O) const;
45 
46  uint64_t getOriginSize() const;
47 
48  uint64_t getTargetSize() const;
49 
50 public:
51  static bool classof(const SEGObject *N) {
52  return N->getKind() == SEGOBJK_Cast;
53  }
54 };
55 
56 #endif
SymbolicExprGraph::dot
void dot(const char *FileName) const
Dot this graph to a file with filename.
Definition: SymbolicExprGraph.cpp:1539
SEGCastNode
Definition: SEGCastNode.h:20
SymbolicExprGraph
Definition: SymbolicExprGraph.h:855
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
SEGCastNode::assembleSEGObject
virtual void assembleSEGObject(std::map< int, SEGObject * > &FuncSEGObjMap)
Assemble the SEG object's related objects.
Definition: SEGCastNode.h:26