• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 // PruneNoOps.h: The PruneNoOps function prunes:
7 //   1. Empty declarations "int;". Empty declarators will be pruned as well, so for example:
8 //        int , a;
9 //      is turned into
10 //        int a;
11 //   2. Literal statements: "1.0;". The ESSL output doesn't define a default precision for float,
12 //      so float literal statements would end up with no precision which is invalid ESSL.
13 
14 #ifndef COMPILER_TRANSLATOR_TREEOPS_PRUNENOOPS_H_
15 #define COMPILER_TRANSLATOR_TREEOPS_PRUNENOOPS_H_
16 
17 #include "common/angleutils.h"
18 
19 namespace sh
20 {
21 class TCompiler;
22 class TIntermBlock;
23 class TSymbolTable;
24 
25 ANGLE_NO_DISCARD bool PruneNoOps(TCompiler *compiler,
26                                  TIntermBlock *root,
27                                  TSymbolTable *symbolTable);
28 }  // namespace sh
29 
30 #endif  // COMPILER_TRANSLATOR_TREEOPS_PRUNENOOPS_H_
31