blob: 2aa5294f0831f3ca0a262428daac8412722c7089 [file] [log] [blame]
Olli Etuahofc0e2bc2015-04-16 13:39:56 +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 SeparateArrayDeclarations function processes declarations that contain array declarators. Each declarator in
7// such declarations gets its own declaration.
8// This is useful as an intermediate step when initialization needs to be separated from declaration.
9// Example:
10// int a[1] = int[1](1), b[1] = int[1](2);
11// gets transformed when run through this class into the AST equivalent of:
12// int a[1] = int[1](1);
13// int b[1] = int[1](2);
14
15#ifndef COMPILER_TRANSLATOR_SEPARATEDECLARATIONS_H_
16#define COMPILER_TRANSLATOR_SEPARATEDECLARATIONS_H_
17
18class TIntermNode;
19
20void SeparateArrayDeclarations(TIntermNode *root);
21
22#endif // COMPILER_TRANSLATOR_SEPARATEDECLARATIONS_H_