blob: 18c275fb4d8bfdce52f235aeaee35ffb7b444eb6 [file] [log] [blame]
Olli Etuaho822fa842015-04-16 14:26:10 +03001//
2// Copyright (c) 2002-2015 The ANGLE Project Authors. All rights reserved.
3// Use of this source code is governed by a BSD-style license that can be
4// found in the LICENSE file.
5//
6// The SeparateArrayInitialization function splits each array initialization into a declaration and an assignment.
7// Example:
8// type[n] a = initializer;
9// will effectively become
10// type[n] a;
11// a = initializer;
Olli Etuahob1edc4f2015-11-02 17:20:03 +020012//
13// Note that if the array is declared as const, the initialization is still split, making the AST
14// technically invalid. Because of that this transformation should only be used when subsequent
15// stages don't care about const qualifiers.
Olli Etuaho822fa842015-04-16 14:26:10 +030016
17#ifndef COMPILER_TRANSLATOR_SEPARATEARRAYINITIALIZATION_H_
18#define COMPILER_TRANSLATOR_SEPARATEARRAYINITIALIZATION_H_
19
20class TIntermNode;
21
22void SeparateArrayInitialization(TIntermNode *root);
23
24#endif // COMPILER_TRANSLATOR_SEPARATEARRAYINITIALIZATION_H_