9 #ifndef IR_SEG_SEGRETURNNODE_H
10 #define IR_SEG_SEGRETURNNODE_H
12 #include <llvm/IR/BasicBlock.h>
14 #include <unordered_map>
15 #include <unordered_set>
17 #include "CBAccessPath.h"
18 #include "IR/SEG/SymbolicExprGraph.h"
26 friend class SEGSerializer;
30 std::unordered_set<SEGReturnSite *> RetInsts;
31 std::unordered_map<const SEGNodeBase *, SEGReturnSite *> RetNodeSiteMap;
36 BasicBlock *BB,
bool fromDisk);
47 decltype(RetNodeSiteMap)::const_iterator returnNodeSiteBegin()
const {
48 return RetNodeSiteMap.begin();
51 decltype(RetNodeSiteMap)::const_iterator returnNodeSiteEnd()
const {
52 return RetNodeSiteMap.end();
55 virtual int64_t getIndex()
const = 0;
59 return O->getKind() >= SEGOBJK_ReturnBegin &&
60 O->getKind() <= SEGOBJK_ReturnEnd;
73 virtual int64_t getIndex()
const {
80 return O->getKind() == SEGOBJK_CommonReturn;
92 BasicBlock *BB,
bool fromDisk);
95 friend class SEGSerializer;
98 virtual int64_t getIndex()
const {
return Index; }
100 const CBAccessPath &getAccessPath()
const {
return AP; }
105 static bool classof(
const SEGObject *O) {
106 return O->getKind() == SEGOBJK_PseudoReturn;