tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

PruneNoOps.h (1006B)


      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 //   3. Statements after discard, return, break and continue.
     14 
     15 #ifndef COMPILER_TRANSLATOR_TREEOPS_PRUNENOOPS_H_
     16 #define COMPILER_TRANSLATOR_TREEOPS_PRUNENOOPS_H_
     17 
     18 #include "common/angleutils.h"
     19 
     20 namespace sh
     21 {
     22 class TCompiler;
     23 class TIntermBlock;
     24 class TSymbolTable;
     25 
     26 [[nodiscard]] bool PruneNoOps(TCompiler *compiler, TIntermBlock *root, TSymbolTable *symbolTable);
     27 }  // namespace sh
     28 
     29 #endif  // COMPILER_TRANSLATOR_TREEOPS_PRUNENOOPS_H_