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 // RemoveUnreferencedVariables.h:
7 //  Drop variables that are declared but never referenced in the AST. This avoids adding unnecessary
8 //  initialization code for them. Also removes unreferenced struct types.
9 //
10 
11 #ifndef COMPILER_TRANSLATOR_TREEOPS_REMOVEUNREFERENCEDVARIABLES_H_
12 #define COMPILER_TRANSLATOR_TREEOPS_REMOVEUNREFERENCEDVARIABLES_H_
13 
14 #include "common/angleutils.h"
15 
16 namespace sh
17 {
18 
19 class TCompiler;
20 class TIntermBlock;
21 class TSymbolTable;
22 
23 ANGLE_NO_DISCARD bool RemoveUnreferencedVariables(TCompiler *compiler,
24                                                   TIntermBlock *root,
25                                                   TSymbolTable *symbolTable);
26 
27 }  // namespace sh
28 
29 #endif  // COMPILER_TRANSLATOR_TREEOPS_REMOVEUNREFERENCEDVARIABLES_H_
30