glsl: Add a constructor for ast_type_specifier.
Reviewed-by: Chad Versace <chad.versace@linux.intel.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
This commit is contained in:
parent
b85f0c5121
commit
43757135b2
|
@ -469,6 +469,22 @@ public:
|
||||||
|
|
||||||
class ast_type_specifier : public ast_node {
|
class ast_type_specifier : public ast_node {
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* \brief Make a shallow copy of an ast_type_specifier, specifying array
|
||||||
|
* fields.
|
||||||
|
*
|
||||||
|
* Use only if the objects are allocated from the same context and will not
|
||||||
|
* be modified. Zeros the inherited ast_node's fields.
|
||||||
|
*/
|
||||||
|
ast_type_specifier(const ast_type_specifier *that, bool is_array,
|
||||||
|
ast_expression *array_size)
|
||||||
|
: ast_node(), type_name(that->type_name), structure(that->structure),
|
||||||
|
is_array(is_array), array_size(array_size), precision(that->precision),
|
||||||
|
is_precision_statement(that->is_precision_statement)
|
||||||
|
{
|
||||||
|
/* empty */
|
||||||
|
}
|
||||||
|
|
||||||
/** Construct a type specifier from a type name */
|
/** Construct a type specifier from a type name */
|
||||||
ast_type_specifier(const char *name)
|
ast_type_specifier(const char *name)
|
||||||
: type_name(name), structure(NULL),
|
: type_name(name), structure(NULL),
|
||||||
|
|
Loading…
Reference in New Issue