2 // Copyright (c) 2014 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.
6 // RewriteElseBlocks.h: Prototype for tree transform to change
7 // all if-else blocks to if-if blocks.
10 #ifndef COMPILER_REWRITE_ELSE_BLOCKS_H_
11 #define COMPILER_REWRITE_ELSE_BLOCKS_H_
13 #include "compiler/translator/intermediate.h"
18 class ElseBlockRewriter : public TIntermTraverser
22 : TIntermTraverser(false, false, true, false)
27 bool visitAggregate(Visit visit, TIntermAggregate *aggregate);
32 TIntermNode *rewriteSelection(TIntermSelection *selection);
35 void RewriteElseBlocks(TIntermNode *node);
39 #endif // COMPILER_REWRITE_ELSE_BLOCKS_H_