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"
16 #include "Persistence/PersistenceBasis.h"
44 virtual size_t getIndex()
const = 0;
48 return N->getKind() >= SEGOBJK_ArgumentBegin &&
49 N->getKind() <= SEGOBJK_ArgumentEnd;
60 this->Index = Node->getIndex();
73 std::string Desc(std::string(
"carg_") + this->getDescription());
74 this->setDescription(Desc);
80 std::string Desc(std::string(
"carg_") + this->getDescription());
81 this->setDescription(Desc);
89 virtual PersistedSEGObject *createPersistedObject()
const {
90 PersistedSEGObject *PersistedObj =
new PersistedSEGCommonArgumentNode;
94 virtual size_t getIndex()
const {
95 assert(Index != (
size_t)-1 &&
"Index of a common argument is not set!");
99 virtual std::string getAuxiliaryDebugStr()
const {
100 return "the index of this common argument is " + std::to_string(Index);
104 static bool classof(
const SEGObject *N) {
105 return N->getKind() == SEGOBJK_CommonArgument;
123 std::string Desc(std::string(
"varg_") + this->getDescription());
124 this->setDescription(Desc);
130 std::string Desc(std::string(
"varg_") + this->getDescription());
131 this->setDescription(Desc);
139 virtual PersistedSEGObject *createPersistedObject()
const {
140 PersistedSEGObject *PersistedObj =
new PersistedSEGVarArgumentNode;
144 virtual size_t getIndex()
const {
150 static bool classof(
const SEGObject *N) {
151 return N->getKind() == SEGOBJK_VarArgument;
162 this->Index = Node->getIndex();
177 std::string Desc(std::string(
"parg_") + this->getDescription());
178 this->setDescription(Desc);
184 std::string Desc(std::string(
"parg_") + this->getDescription());
185 this->setDescription(Desc);
193 virtual PersistedSEGObject *createPersistedObject()
const {
194 PersistedSEGObject *PersistedObj =
new PersistedSEGPseudoArgumentNode;
198 virtual size_t getIndex()
const {
199 assert(Index != (
size_t)-1 &&
"Index of a pseudo argument is not set!");
204 static bool classof(
const SEGObject *N) {
205 return N->getKind() == SEGOBJK_PseudoArgument;
210 const CBAccessPath &getAccessPath()
const {
return AP; }