• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //
2 // Copyright 2024 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 // SeparateStructFromFunctionDeclarations: Separate struct declarations from
7 // function declaration return type. If necessary gives nameless structs
8 // internal names.
9 //
10 // For example:
11 //   struct Foo { int a; } foo();
12 // becomes:
13 //   struct Foo { int a; };
14 //   Foo foo();
15 //
16 
17 #ifndef COMPILER_TRANSLATOR_TREEOPS_SEPARATESTRUCTFROMFUNCTIONDECLARATIONS_H_
18 #define COMPILER_TRANSLATOR_TREEOPS_SEPARATESTRUCTFROMFUNCTIONDECLARATIONS_H_
19 
20 #include "common/angleutils.h"
21 
22 namespace sh
23 {
24 class TCompiler;
25 class TIntermBlock;
26 class TSymbolTable;
27 
28 [[nodiscard]] bool SeparateStructFromFunctionDeclarations(TCompiler &compiler, TIntermBlock &root);
29 }  // namespace sh
30 
31 #endif  // COMPILER_TRANSLATOR_TREEOPS_SEPARATESTRUCTFROMFUNCTIONDECLARATIONS_H_
32