1 // 2 // Copyright 2017 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 // WrapSwitchStatementsInBlocks.h: Wrap switch statements in blocks and declare all switch-scoped 7 // variables there to make the AST compatible with HLSL output. 8 9 #ifndef COMPILER_TRANSLATOR_TREEOPS_WRAPSWITCHSTATEMENTSINBLOCKS_H_ 10 #define COMPILER_TRANSLATOR_TREEOPS_WRAPSWITCHSTATEMENTSINBLOCKS_H_ 11 12 #include "common/angleutils.h" 13 14 namespace sh 15 { 16 17 class TCompiler; 18 class TIntermBlock; 19 20 // Wrap switch statements in the AST into blocks when needed. Returns true if the AST was changed. 21 ANGLE_NO_DISCARD bool WrapSwitchStatementsInBlocks(TCompiler *compiler, TIntermBlock *root); 22 23 } // namespace sh 24 25 #endif // COMPILER_TRANSLATOR_TREEOPS_WRAPSWITCHSTATEMENTSINBLOCKS_H_ 26