9 #ifndef IR_SEG_SEGARGUMENTNODE_H
10 #define IR_SEG_SEGARGUMENTNODE_H
12 #include <llvm/IR/BasicBlock.h>
14 #include "CBAccessPath.h"
15 #include "IR/SEG/SymbolicExprGraph.h"
21 BasicBlock *BB,
bool fromDisk)
33 virtual int64_t getIndex()
const = 0;
37 return N->getKind() >= SEGOBJK_ArgumentBegin &&
38 N->getKind() <= SEGOBJK_ArgumentEnd;
53 std::string Desc(std::string(
"carg_") + this->getDescription());
54 this->setDescription(Desc);
58 BasicBlock *BB,
bool fromDisk)
63 std::string Desc(std::string(
"carg_") + this->getDescription());
64 this->setDescription(Desc);
68 friend class SEGSerializer;
74 virtual int64_t getIndex()
const {
75 assert(Index != (int64_t)-1 &&
"Index of a common argument is not set!");
79 virtual std::string getAuxiliaryDebugStr()
const {
80 return "the index of this common argument is " + std::to_string(Index);
85 return N->getKind() == SEGOBJK_CommonArgument;
94 std::string Desc(std::string(
"varg_") + this->getDescription());
95 this->setDescription(Desc);
99 BasicBlock *BB,
bool fromDisk)
101 std::string Desc(std::string(
"varg_") + this->getDescription());
102 this->setDescription(Desc);
110 virtual int64_t getIndex()
const {
116 static bool classof(
const SEGObject *N) {
117 return N->getKind() == SEGOBJK_VarArgument;
130 std::string Desc(std::string(
"parg_") + this->getDescription());
131 this->setDescription(Desc);
135 BasicBlock *BB,
bool fromDisk)
136 :
SEGArgumentNode(SEGOBJK_PseudoArgument, Val, Ty, SEG, BB, fromDisk) {
137 std::string Desc(std::string(
"parg_") + this->getDescription());
138 this->setDescription(Desc);
142 friend class SEGSerializer;
143 friend class SEGHash;
148 virtual int64_t getIndex()
const {
149 assert(Index != (int64_t)-1 &&
"Index of a pseudo argument is not set!");
154 static bool classof(
const SEGObject *N) {
155 return N->getKind() == SEGOBJK_PseudoArgument;
160 const CBAccessPath &getAccessPath()
const {
return AP; }