xref: /aosp_15_r20/external/angle/src/compiler/translator/tree_ops/glsl/apple/UnfoldShortCircuitAST.h (revision 8975f5c5ed3d1c378011245431ada316dfb6f244)
1 //
2 // Copyright 2002 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 // UnfoldShortCircuitAST is an AST traverser to replace short-circuiting
7 // operations with ternary operations.
8 //
9 
10 #ifndef COMPILER_TRANSLATOR_TREEOPS_GLSL_APPLE_UNFOLDSHORTCIRCUITAST_H_
11 #define COMPILER_TRANSLATOR_TREEOPS_GLSL_APPLE_UNFOLDSHORTCIRCUITAST_H_
12 
13 #include "common/angleutils.h"
14 #include "common/debug.h"
15 
16 namespace sh
17 {
18 
19 class TCompiler;
20 class TIntermBlock;
21 
22 #if defined(ANGLE_ENABLE_GLSL) && defined(ANGLE_PLATFORM_APPLE)
23 [[nodiscard]] bool UnfoldShortCircuitAST(TCompiler *compiler, TIntermBlock *root);
24 #else
UnfoldShortCircuitAST(TCompiler * compiler,TIntermBlock * root)25 [[nodiscard]] ANGLE_INLINE bool UnfoldShortCircuitAST(TCompiler *compiler, TIntermBlock *root)
26 {
27     UNREACHABLE();
28     return false;
29 }
30 #endif
31 
32 }  // namespace sh
33 
34 #endif  // COMPILER_TRANSLATOR_TREEOPS_GLSL_APPLE_UNFOLDSHORTCIRCUITAST_H_
35