Skip to content

SgStorageModifier

This class represents modifiers specific to storage.

Synopsis

Declared in <src/frontend/SageIII/Cxx_Grammar.h> (not stored in Git)

class [[visibility("default")]] SgStorageModifier
    : public SgModifier

Description

This modifier is set to only one of a collection of values. To unset any value (e.g. "extern") just call "setDefault()" to restore the default value.

  • Note: For more detail see the C++ grammar specification in Bjarne's book, Appendix B.
  • See also: Example of using a SgStorageModifier object

Data members

SgStorageModifier::storage_modifier_enum p_modifier

enum value (can be set to only one of several values)

Member functions

SgStorageModifier::isStatic () const

Storage modifier is static (always false for the SgStorageModifier in the SgInitializedName).

  • Internal: Note that the isStatic() for variable declarations is stored in the SgStorageModifier of theSgDeclarationModifier in the SgVariableDeclaration, and not in the SgStorageModifier stored in the SgInitializedName. This is a result of the structure of code, where the static keyword can not be used to selectively apply to individual variables in a list of names in a variable declaration.
  • Return: Returns bool.

Base Classes

Name Description
SgModifier This class represents the base class of a number of IR nodes define modifiers

Type Aliases

Name
base_node_type

Enums

Name Description
Unnamed enum static variant value
storage_modifier_enum Storage Modifiers (only one value can be specified)

Member Functions

Name Description
SgStorageModifier
SgStorageModifier(); [constructor]
Constructors
~SgStorageModifier
virtual ~SgStorageModifier(); [destructor] [virtual]
Destructor
operator=
SgStorageModifier& operator=(SgStorageModifier const& X);
Copy assignment operator
accept
virtual void accept(ROSE_VisitorPattern& visitor) override; [virtual]
support for the classic visitor pattern done in GoF
appendDestructorOwnedNodes
virtual void appendDestructorOwnedNodes(std::vector<SgNode*>& nodes) const override; [virtual]
class_name
virtual std::string class_name() const override; [virtual]
returns a string representing the class name
copy
virtual SgNode* copy(SgCopyHelp& help) const override; [virtual]
display
void display(std::string label) const;
displayString
std::string displayString() const;
get_childIndex
virtual size_t get_childIndex(SgNode* child) const override; [virtual]
index-based access to traversal successors by child node
get_modifier
SgStorageModifier::storage_modifier_enum get_modifier() const;
get_numberOfTraversalSuccessors
virtual size_t get_numberOfTraversalSuccessors() const override; [virtual]
return number of children in the traversal successor list
get_thread_local_storage
bool get_thread_local_storage() const;
get_traversalSuccessorByIndex
virtual SgNode* get_traversalSuccessorByIndex(size_t idx) const override; [virtual]
index-based access to traversal successors by index number
get_traversalSuccessorContainer
virtual std::vector<SgNode*> get_traversalSuccessorContainer() const override; [virtual]
container of pointers to AST successor nodes used in the traversal overridden in every class by generated implementation
get_traversalSuccessorIsListElement
virtual std::vector<bool> get_traversalSuccessorIsListElement() const override; [virtual]
get_traversalSuccessorNamesContainer
virtual std::vector<std::string> get_traversalSuccessorNamesContainer() const override; [virtual]
container of names of variables or container indices used used in the traversal to access AST successor nodes overridden in every class by generated implementation
isAsm
bool isAsm() const;
isAuto
bool isAuto() const;
isContiguous
bool isContiguous() const;
isCudaConstant
bool isCudaConstant() const;
isCudaDeviceMemory
bool isCudaDeviceMemory() const;
isCudaDynamicShared
bool isCudaDynamicShared() const;
isCudaGlobal
bool isCudaGlobal() const;
isCudaManaged
bool isCudaManaged() const;
isCudaPinned
bool isCudaPinned() const;
isCudaShared
bool isCudaShared() const;
isCudaTexture
bool isCudaTexture() const;
isCudaUnified
bool isCudaUnified() const;
isDefault
bool isDefault() const;
isExtern
bool isExtern() const;
isMutable
bool isMutable() const;
isRegister
bool isRegister() const;
isStatic
bool isStatic() const;
isTypedef
bool isTypedef() const;
isUnknown
bool isUnknown() const;
isUnspecified
bool isUnspecified() const;
operator delete
void operator delete( void* pointer, size_t size);
deallocated memory for IR node (returns memory to memory pool for reuse)
operator new
void* operator new(size_t size);
returns pointer to newly allocated IR node
post_construction_initialization
virtual void post_construction_initialization() override; [virtual]
processDataMemberReferenceToPointers
virtual void processDataMemberReferenceToPointers(ReferenceToPointerHandler*) override; [virtual]
Pass references to stored node pointers to a handler.
reset
void reset();
returnDataMemberPointers
virtual std::vector<std::pair<SgNode*, std::string>> returnDataMemberPointers() const override; [virtual]
Return the node pointers stored in this node's data members.
roseRTI
virtual RTIReturnType roseRTI() override; [virtual]
return C++ Runtime-Time-Information
sage_class_name
virtual char const* sage_class_name() const override; [virtual]
returns a C style string (char*) representing the class name
setAsm
void setAsm();
setAuto
void setAuto();
setContiguous
void setContiguous();
setCudaConstant
void setCudaConstant();
setCudaDeviceMemory
void setCudaDeviceMemory();
setCudaDynamicShared
void setCudaDynamicShared();
setCudaGlobal
void setCudaGlobal();
setCudaManaged
void setCudaManaged();
setCudaPinned
void setCudaPinned();
setCudaShared
void setCudaShared();
setCudaTexture
void setCudaTexture();
setCudaUnified
void setCudaUnified();
setDefault
void setDefault();
setExtern
void setExtern();
setMutable
void setMutable();
setRegister
void setRegister();
setStatic
void setStatic();
setTypedef
void setTypedef();
setUnknown
void setUnknown();
setUnspecified
void setUnspecified();
set_modifier
void set_modifier(SgStorageModifier::storage_modifier_enum modifier);
set_thread_local_storage
void set_thread_local_storage(bool thread_local_storage);
variantT
virtual VariantT variantT() const override; [virtual]
returns new style SageIII enum values

Static Member Functions

Name Description
memoryUsage
static size_t memoryUsage();
Returns the size in bytes of the total memory allocated for all IR nodes of this type
numberOfNodes
static size_t numberOfNodes();
Returns the total number of IR nodes of this type
traverseMemoryPoolNodes
static void traverseMemoryPoolNodes(ROSE_VisitTraversal& visit);
FOR INTERNAL USE Support for visitor pattern over all IR nodes by type of IR node.
traverseMemoryPoolVisitorPattern
static void traverseMemoryPoolVisitorPattern(ROSE_VisitorPattern& visitor);
FOR INTERNAL USE Support for visitor pattern.
visitRepresentativeNode
static void visitRepresentativeNode(ROSE_VisitTraversal& visit);
FOR INTERNAL USE Support for type-based traversal.

Static Data Members

Name Description
free_slots Free slots, each numbered pool_index * pool_size + slot_index. The last entry is allocated next.
pool_live_flags
pool_size
pools

Protected Data Members

Name
p_modifier
p_thread_local_storage

Friends

Name Description
isSgStorageModifier Casts pointer from base class to derived class (for const pointers)
isSgStorageModifier Casts pointer from base class to derived class
operator== Equality operator
operator<< Stream insertion operator

Created with MrDocs