10 #include <spirv/unified1/spirv.h>
19 : Id(Id), Ty(Ty), Initializer(Initializer)
bool isBufferVariable() const
Returns true if this variable has a buffer or uniform storage class.
Variable(uint32_t Id, const Type *Ty, uint32_t Initializer=0)
Create a module scope variable with an optional initializer.
std::map< uint32_t, uint32_t > Decorations
Map of decorations.
uint32_t getDecoration(uint32_t Decoration) const
Returns the decoration data associated with this variable.
This file declares the Type class.
uint32_t getStorageClass() const
Returns the storage class of this type.
void addDecoration(uint32_t Decoration, uint32_t Data)
Add a decoration to this variable.
const Type * Ty
Type of the variable.
This class represents a SPIR-V type.
This file declares the Variable class.
bool hasDecoration(uint32_t Decoration) const
Returns true if this variable has been decorated with Decoration.