xref: /aosp_15_r20/external/angle/src/compiler/translator/tree_ops/hlsl/SeparateArrayConstructorStatements.h (revision 8975f5c5ed3d1c378011245431ada316dfb6f244)
1 //
2 // Copyright 2018 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 // SeparateArrayConstructorStatements splits statements that are array constructors and drops all of
7 // their constant arguments. For example, a statement like:
8 //   int[2](0, i++);
9 // Will be changed to:
10 //   i++;
11 
12 #ifndef COMPILER_TRANSLATOR_TREEOPS_HLSL_SEPARATEARRAYCONSTRUCTORSTATEMENTS_H_
13 #define COMPILER_TRANSLATOR_TREEOPS_HLSL_SEPARATEARRAYCONSTRUCTORSTATEMENTS_H_
14 
15 #include "common/angleutils.h"
16 
17 namespace sh
18 {
19 class TCompiler;
20 class TIntermBlock;
21 
22 [[nodiscard]] bool SeparateArrayConstructorStatements(TCompiler *compiler, TIntermBlock *root);
23 }  // namespace sh
24 
25 #endif  // COMPILER_TRANSLATOR_TREEOPS_HLSL_SEPARATEARRAYCONSTRUCTORSTATEMENTS_H_
26