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 SEGCastNode : public SEGOpcodeNode {
19 private:
20  uint64_t OriginSize;
21  uint64_t TargetSize;
22 
23  bool IsTemporary = false;
24 
25  SEGCastNode(CodeKind Opcode, Type *Ty, SymbolicExprGraph *SEG, BasicBlock *BB,
26  uint64_t OSz, uint64_t TSz, bool fromDisk);
27 
28  friend class SymbolicExprGraph;
29 
30 public:
31  virtual ~SEGCastNode();
32 
33  virtual void dot(raw_fd_ostream &O) const;
34 
35  uint64_t getOriginSize() const;
36 
37  uint64_t getTargetSize() const;
38 
39  bool isTemporary() const { return IsTemporary; }
40 
41  void setTemporary() { IsTemporary = true; }
42 
43 public:
44  static bool classof(const SEGObject *N) {
45  return N->getKind() == SEGOBJK_Cast;
46  }
47 };
48 
49 #endif
SymbolicExprGraph::dot
void dot(const char *FileName) const
Dot this graph to a file with filename.
Definition: SymbolicExprGraph.cpp:894
SEGOpcodeNode::CodeKind
CodeKind
Definition: SymbolicExprGraph.h:527
SEGCastNode
Definition: SEGCastNode.h:18
SymbolicExprGraph
Definition: SymbolicExprGraph.h:715
SEGObject
Definition: SymbolicExprGraph.h:78
SEGOpcodeNode
Definition: SymbolicExprGraph.h:524