xref: /aosp_15_r20/external/angle/src/compiler/translator/msl/ToposortStructs.h (revision 8975f5c5ed3d1c378011245431ada316dfb6f244)
1 //
2 // Copyright 2020 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 
7 #ifndef COMPILER_TRANSLATOR_MSL_TOPOSORTSTRUCTS_H_
8 #define COMPILER_TRANSLATOR_MSL_TOPOSORTSTRUCTS_H_
9 
10 #include "common/angleutils.h"
11 #include "compiler/translator/Compiler.h"
12 #include "compiler/translator/msl/ProgramPrelude.h"
13 #include "compiler/translator/msl/SymbolEnv.h"
14 
15 namespace sh
16 {
17 
18 // Does a toposort on structs based on type dependencies.
19 // Struct type declarations are moved to the top of the root block.
20 [[nodiscard]] bool ToposortStructs(TCompiler &compiler,
21                                    SymbolEnv &symbolEnv,
22                                    TIntermBlock &root,
23                                    ProgramPreludeConfig &ppc);
24 
25 }  // namespace sh
26 
27 #endif  // COMPILER_TRANSLATOR_MSL_TOPOSORTSTRUCTS_H_
28