AstValueAttribute
IR node attribute that stores a copyable value.
Synopsis
Declared in <src/midend/astProcessing/AstAttributeMechanism.h>
template<class T>
class AstValueAttribute
: public AstAttribute
Base Classes
Name |
Description |
Base class for all IR node attribute values. |
Types
Name |
Description |
Type of value this wrapper holds. |
Member Functions
Name |
Description |
|
Constructors |
|
|
|
|
Return the stored value by reference. |
|
Assign a new value. |
Private Data Members
Name |
Derived Classes
Name |
Description |
Attribute storing an SgNode. |
Description
Since IR node attributes must all inherit from AstAttribute we need to write wrappers around POD types and 3rd party types when we want to store them as IR attributes. We've ended up with a proliferation of such attributes that all do almost the same thing but have different names to access their data members. Hopefully by providing one class template we can avoid further proliferation.
Created with MrDocs