xref: /aosp_15_r20/external/angle/src/compiler/translator/ValidateSwitch.h (revision 8975f5c5ed3d1c378011245431ada316dfb6f244)
1*8975f5c5SAndroid Build Coastguard Worker //
2*8975f5c5SAndroid Build Coastguard Worker // Copyright 2002 The ANGLE Project Authors. All rights reserved.
3*8975f5c5SAndroid Build Coastguard Worker // Use of this source code is governed by a BSD-style license that can be
4*8975f5c5SAndroid Build Coastguard Worker // found in the LICENSE file.
5*8975f5c5SAndroid Build Coastguard Worker //
6*8975f5c5SAndroid Build Coastguard Worker 
7*8975f5c5SAndroid Build Coastguard Worker #ifndef COMPILER_TRANSLATOR_VALIDATESWITCH_H_
8*8975f5c5SAndroid Build Coastguard Worker #define COMPILER_TRANSLATOR_VALIDATESWITCH_H_
9*8975f5c5SAndroid Build Coastguard Worker 
10*8975f5c5SAndroid Build Coastguard Worker #include "compiler/translator/BaseTypes.h"
11*8975f5c5SAndroid Build Coastguard Worker #include "compiler/translator/Common.h"
12*8975f5c5SAndroid Build Coastguard Worker 
13*8975f5c5SAndroid Build Coastguard Worker namespace sh
14*8975f5c5SAndroid Build Coastguard Worker {
15*8975f5c5SAndroid Build Coastguard Worker class TDiagnostics;
16*8975f5c5SAndroid Build Coastguard Worker class TIntermBlock;
17*8975f5c5SAndroid Build Coastguard Worker 
18*8975f5c5SAndroid Build Coastguard Worker // Check for errors and output error messages on the context.
19*8975f5c5SAndroid Build Coastguard Worker // Returns true if there are no errors.
20*8975f5c5SAndroid Build Coastguard Worker bool ValidateSwitchStatementList(TBasicType switchType,
21*8975f5c5SAndroid Build Coastguard Worker                                  TDiagnostics *diagnostics,
22*8975f5c5SAndroid Build Coastguard Worker                                  TIntermBlock *statementList,
23*8975f5c5SAndroid Build Coastguard Worker                                  const TSourceLoc &loc);
24*8975f5c5SAndroid Build Coastguard Worker 
25*8975f5c5SAndroid Build Coastguard Worker }  // namespace sh
26*8975f5c5SAndroid Build Coastguard Worker 
27*8975f5c5SAndroid Build Coastguard Worker #endif  // COMPILER_TRANSLATOR_VALIDATESWITCH_H_
28